Hi, Try: Either: forsentest[1,] <- unlist(forsen[1,]) #or
forsen[] <- lapply(forsen,as.character) forsentest[1,] <- forsen[1,] A.K. On Monday, January 27, 2014 10:38 PM, Tjun Kiat Teo <teotj...@gmail.com> wrote: I created an an empty data frame this way: forsentest<-data.frame(matrix(nrow=nod,ncol=f)). Then I tried to assign one row of another data frame forsen to it forsentest[1,]<-forsen[1,] But the factors in forsen gets converted to numbers in forsentest which is not what I want. Is there another way around it ? Tjun Kiat [[alternative HTML version deleted]] ______________________________________________ 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. ______________________________________________ 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.