Re: [R] issue building dataframes with matrices.

2008-08-12 Thread Bill.Venables
om: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daryl Morris Sent: Wednesday, 13 August 2008 11:31 AM To: r-help@r-project.org Subject: [R] issue building dataframes with matrices. Hello, Is this a bug or a feature? I am using R 2.7.1 on Apple OS X. > y <- matrix(1:3,nrow=

[R] issue building dataframes with matrices.

2008-08-12 Thread Daryl Morris
Hello, Is this a bug or a feature? I am using R 2.7.1 on Apple OS X. > y <- matrix(1:3,nrow=3) # y is a single-column matrix > df <-data.frame(x=1:3,y=y) > sapply(df,data.class) x y "numeric" "numeric" > df$yy <- y > sapply(df,data.class) x yyy "numeric