[R] string to number conversion

Serge Boiko boiko at demogr.mpg.de
Wed Jan 29 16:47:03 CET 2003


Hi there;
In order to convert sting to number I do:
s <- "22"
mode(s) <- "integer" # "double", etc. will do

Is that a "preferred" way?

Many thanks.
-Serge




More information about the R-help mailing list