[R] Ordering of rows/names

Paul Boutros pcboutro at engmail.uwaterloo.ca
Mon Nov 18 21:08:37 CET 2002


Hi all,

I have a data.frame e3.  I use a function on it:
n3 <- normalize.qspline(x = e3, samples = 0.07, na.rm = TRUE);

The resulting data.frame has lost it's row-names and column names.  This
is the natural behaviour of the function I am calling, and I can't alter
that at the moment.  However, the data *is* in the correct order, as it
was initially -- the names are just missing in the new data structure.

If I just use:
q3 <- data.frame(n3, row.names=e3[,1]);
names(q3) <- names(e3)[2:length(names(e3))];

Am I guaranteed to be assigning the row & column names in the correct
order?  In all the test-cases I have done, they DO appear in the correct
order, but I wanted to verify that this behaviour is indeed a true
R-feature as opposed to a nice thing just occurring on my platform.

Any feedback would very much be appreciated!
Paul

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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