Hi All,
I would like to choice between these two data frame convert. which is
faster?

   for(i in 1:ncol(DataFrame)){

                    DataFrame[,i] <- as.numeric(DataFrame[,i])
                }


OR

DataFrame <- as.data.frame(apply(DataFrame,2 ,function(x) as.numeric(x)))


Thanks
Karim
  Ô__
 c/ /'_;~~~~kmezhoud
(*) \(*)   ⴽⴰⵔⵉⵎ  ⵎⴻⵣⵀⵓⴷ
http://bioinformatics.tn/

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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