copy_vector | R Documentation |
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
clone
, still.identical
, reverse_vector
x <- factor(letters)
y <- x
z <- copy_vector(x)
still.identical(x,y)
still.identical(x,z)
str(x)
str(y)
str(z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.