[R] as.numeric with tclvalue redux

Erin Hodgess erinm.hodgess at gmail.com
Mon Mar 24 18:39:50 CET 2008


Hi again R People:

This works fine:
> library(tcltk)
> a <- tclVar("4.5")
> as.numeric(tclvalue(a))
[1] 4.5
> #But if you have:
> b <- tclVar("pi")
> as.numeric(tclvalue(b))
[1] NA
Warning message:
NAs introduced by coercion
>

Is anyone aware of a way around this, please?

thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com



More information about the R-help mailing list