?as.numeric
> x <- "3"
> y <- "3.5"
> x
[1] "3"
> as.numeric(x)
[1] 3
> y
[1] "3.5"
> as.numeric(y)
[1] 3.5
Sarah
On 11/13/06, Peter Lauren <[EMAIL PROTECTED]> wrote:
> Does R have anything like strtod, atoi, atod, etc. in
> C? I would like to covert "3" to 3 and "3.5" to 3.5 .
>
> Thanks,
> Peter Lauren.
>
> __
> R-help@stat.math.ethz.ch 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.
>
--
Sarah Goslee
http://www.functionaldiversity.org
__
R-help@stat.math.ethz.ch 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.