[R] a quick Q: a function in R, equivalent to "atoi" function in C?

Jerome Asselin jerome at hivnet.ubc.ca
Thu Jul 31 01:18:53 CEST 2003


?as.numeric

On July 30, 2003 04:08 pm, Yan Yu wrote:
> Hello,
>    I wonder is there a function in R, which can achieve the
> functionality of atoi in C, i.e., convert from a character string to a
> number?
>
> I use Sys.getenv(), it returns a character string, e.g., "12", but i
> need a number, e.g., 12, to fit into a function.
>
> thanks a lot,
> yan
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list