powered by
Skips the attributes that the to object already has to avoid overwriting dim and other important attributes
copyAllNewAttributes(from, to, attr2skip = c(), attr2force = c())
object The to argument object
object
to
The from object
The to object
An optional lists of attributes that you may want to avoid having copied
An optional lists of attributes that you may want to force copy even if they already exist in the new object
a <- "test" attr(a, 'wow') <- 1000 b <- a b <- copyAllNewAttributes(a, b) print(attr(b, 'wow'))
Run the code above in your browser using DataLab