On 29-02-2012, at 11:49, Aniruddha Mukherjee wrote: > > Hello Berend. > > Many thanks for your prompt reply and that helped me a lot. One more thing, > if you please explain, I shall be highly obliged. > Why in my case (i.e. when stringsAsFactors was TRUE by default), > > as.numeric(matr1$Pulse_rate) > displays the following > [1] 4 5 7 5 9 8 6 10 3 2 5 1 10 10 > ?
?factor and play a little bit as.factor(c("A","8.9")) as.numeric(as.factor(c("A","8.9"))) str(as.factor(c("A","8.9"))) and read the R Intro manual (chapter 4). Berend ______________________________________________ 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.