On 16/10/2007, at 8:30 AM, pintinho wrote: > > Hi, > > I am getting a strange result while converting a string vector into > numeric > vector: > >> Datas[1] > [1] 37315 > >> as.numeric(Datas[1]) > [1] 2 > > Can anyone help me??
It would seem that ``Datas'' is a ***factor*** and NOT a ``string vector'' (i.e. not a vector of mode character). There is much (repetitive) discussion on this list of how to convert a factor to a numeric vector. See FAQ 7.10. cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ______________________________________________ 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.