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=
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
2 matches
Mail list logo