search for: mydf0

Displaying 1 result from an estimated 1 matches for "mydf0".

Did you mean: mydf
2004 Oct 09
2
conversion of a data.frame of numerics to a data.frame of factors
Hi, I am trying to convert a data.frame of numerics (this could be a matrix as well in this case) into a data.frame of factors. I did it in a way that is less than direct... myforet2<-t(myforet) for (i in 1:length(myforet2[1,])) { if (i == 1)myforetfact<-list(as.factor(myforet2[,i])) else myforetfact<-c(myforetfact,list(as.factor(myforet2[,i]))) }