View source: R/copyAllNewAttributes.R
copyAllNewAttributes | R Documentation |
Skips the attributes that the to object already has to avoid overwriting dim and other important attributes
copyAllNewAttributes(from, to, attr2skip = c(), attr2force = c())
from |
The from object |
to |
The to object |
attr2skip |
An optional lists of attributes that you may want to avoid having copied |
attr2force |
An optional lists of attributes that you may want to force copy even if they already exist in the new object |
object
The to
argument object
a <- "test"
attr(a, 'wow') <- 1000
b <- a
b <- copyAllNewAttributes(a, b)
print(attr(b, 'wow'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.