Re: [R] as.numeric with tclvalue redux

2008-03-24 Thread Erin Hodgess
Thank you! On 3/24/08, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Erin Hodgess wrote: > > 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(tc

Re: [R] as.numeric with tclvalue redux

2008-03-24 Thread Peter Dalgaard
Erin Hodgess wrote: > 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 > > >

Re: [R] as.numeric with tclvalue redux

2008-03-24 Thread Sundar Dorai-Raj
Erin Hodgess said the following on 3/24/2008 10:39 AM: > 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 coerc