[R] as.numeric with tclvalue redux

From: Erin Hodgess <erinm.hodgess_at_gmail.com>
Date: Mon, 24 Mar 2008 11:39:50 -0600


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

______________________________________________
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.
Received on Mon 24 Mar 2008 - 17:47:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 24 Mar 2008 - 19:31:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive