Grokbase Groups R r-help October 2001
FAQ
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 16 | next ›
Discussion Overview
groupr-help @
categoriesr
postedOct 1, '01 at 9:26p
activeOct 26, '01 at 6:23p
posts16
users11
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase