No subject

Laurent Gautier laurent at genome.cbs.dtu.dk
Mon Oct 22 17:36:46 CEST 2001


Dear all,



I may have overlooked something but the following piece of code causes me
trouble:


> a_data.frame(1:4)
> a
  X1.4
1    1
2    2
3    3
4    4
> apply(a,2,cat)
1 2 3 4Error in ans[[1]] : subscript out of bounds
> apply(a,1,cat)
1234NULL


Is this the fact my data.frame has only one dimension ?
(and do I forget somewhere (but where ?) to specify not to 'drop'
dimension or something similar ?)




regards,






Laurent Gautier			CBS, Building 208, DTU
PhD. Student			D-2800 Lyngby,Denmark	
tel: +45 45 25 24 85		http://www.cbs.dtu.dk/laurent

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list