[R] memory blues
Laurent Gautier
laurent at cbs.dtu.dk
Mon Jul 9 17:46:41 CEST 2001
Dear all,
I would like to know if the following behaviour is what one would expect ?
(I am running R-1.2.3 (I know I'd better upgrade) under Linux).
It seems a data.frame with only one column becomes a special case.... and
I cannot figure out why (I'd see no problem in being told to rtfm, I could not
find
anything about that in the help pages)
> a <- data.frame(c(1:3),row.names=c("c","a","b"))
> a
c.1.3.
c 1
a 2
b 3
> a[order(row.names(a)),]
[1] 2 3 1
...kinda odd, especially since the following give what I'd expect....
> a <- data.frame(cbind(c(1:3),c(3:5)),row.names=c("c","a","b"))
> a
X1 X2
c 1 3
a 2 4
b 3 5
> a[order(row.names(a)),]
X1 X2
a 2 4
b 3 5
c 1 3
Cheers,
Laurent
--
Laurent Gautier CBS, Building 208, DTU
PhD. Student D-2800 Lyngby,Denmark
tel: +45 45 25 24 85 http://www.cbs.dtu.dk/laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010709/8e9f5616/attachment.html
More information about the R-help
mailing list