Hi R users:

I found that I cannot stack() a data.frame with factors.

db1<-data.frame(replicate(6,factor(sample(c("A","B"),6,replace=TRUE))))
str(db1)
db2<-stack(db1)
db2

"db2" does not have any row.

How can I stack them by the variables X1,X2,...,X6?

Thank you for your help.

Kenneth

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to