It's not clear what is going on here, but one possibility is
> as.numeric("pi")
[1] NA
Warning message:
NAs introduced by coercion
OTOH, "Inf" works for me.
The difference is that 'Inf' is a standard C99 value (like 1.23), whereas
'pi' is a variable in R. So if you want to allow expressions yo
Dear R People:
I have an interactive menu via an Rcmdr extension package which asks
for lower and upper limit to evaluate.
Typically, I use:
assign("a",as.numeric(tclvalue(lowlim)),envir=.GlobalEnv)
and that's fine.
However, if I try to use pi or Inf or -Inf, I get either coerced NAs or NaN.
2 matches
Mail list logo