[R] convert Factor as numeric
Ben Bolker
bolker at ufl.edu
Thu Apr 29 13:43:08 CEST 2010
arnaud Gaboury <arnaud.gaboury <at> gmail.com> writes:
>
> Dear group,
>
> I know this issue has been already covered, and before you reply I must say
> I have read the R-FAQ and search the mailing list archive.
> I still can't manage to change my factor to numeric as I couldn't find any
> clear answer.
(Posting via Gmane, so there will probably be four other
solutions by the time this shows up.)
Your problem is that R does not recognize the comma
separators in your numeric format. Thanks for posting
reproducible code!
as.numeric(gsub(",","",as.character(Pose1$SETTLEMENT)))
More information about the R-help
mailing list