Copy atomic R vector
Creates a true copy of the underlying C-vector – dropping all attributes – and optionally reverses the direction of the elements.
copy_vector(x, revx = FALSE)
x |
an R vector |
revx |
default |
This can be substantially faster than duplicate(as.vector(unclass(x)))
copied R vector
x <- factor(letters) y <- x z <- copy_vector(x) still.identical(x,y) still.identical(x,z) str(x) str(y) str(z)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.