JavaEar 专注于收集分享传播有价值的技术资料

What to use instead of the as.real?

I've start improving some old R code and find that next functions are deprecated:

  • real creates a double precision vector of the specified length. Each element of the vector is equal to 0.
  • as.real attempts to coerce its argument to be of double type.
  • is.real returns TRUE or FALSE depending on whether its argument is of double type or not.

And what to use instead?


  1. Wow, that's pretty old code. I think you'll be fine with double, as.double, and is.double.