Re: [R] Stack with factors

2010-04-01 Thread Peter Ehlers
On 2010-04-01 3:53, Ken Knoblauch wrote: Kenneth Roy Cabrera Torres une.net.co> writes: 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

Re: [R] Stack with factors

2010-04-01 Thread Ken Knoblauch
Kenneth Roy Cabrera Torres une.net.co> writes: > 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 variable

[R] Stack with factors

2010-04-01 Thread Kenneth Roy Cabrera Torres
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