Using the package units, I can create a vector with physical units, for example:
library(units)
a = 1:10
units(a) <- with(ud_units, m/s)
a
but how can I return to a simple R-vector without units?
unclass(a) It does most of the work, but leaves a lot of attributes in the vector:
unclass(a)
#
#
#
#
#
#
#
#
#
#
but I believe that there should be an easier way. Assignment unitlessdoes not help, it creates a vector with units "without unit".
Nothing in the vignette either ...
source
share