On Tue, 2004-03-02 at 11:59, [EMAIL PROTECTED] wrote: > Apparently row names are dropped when I extract > single column from a data frame. Why this behaviour ? > > > y <- as.matrix(df[,1:2]); length(row.names(y)) > [1] 324 > > y <- as.matrix(df[,1:1]); length(row.names(y)) > [1] 0 > > Best regards, > > Ryszard
Please see R-FAQ 7.7: "Why do my matrices lose dimensions?" HTH, Marc Schwartz ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html