[R] converting character to numeric
Denis Kazakiewicz
d.kazakiewicz at gmail.com
Tue Jun 21 22:42:28 CEST 2011
Hi
Sorry, can't answer your question
However, I had exactly the same problem and just came back to my
spreadsheet redactor and changed the format of cells
Denis
> I'm trying to convert data from character to numeric.
>
> I've imported data as a csv file, I'm assuming that the import is a
> database - are all the columns in a database considered "vectors" and that
> they can be operated on individually
> Therefore I've tried the following
> mydata<- as.numeric(mydata$apples)
>
> when i then look at mydata again the named column is still in "character"
> format
> if i do mydata2<- as.numeric(mydata$apples)
> the new object mydata2 is empty.
>
> Am i missing something about the structure of R?
>
> alina
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list