copy_attr | R Documentation |
This function copy attributes and methods from classes or instances to class or instance.
copy_attr(
env,
...,
avoid = c("..method_env..", "..init_call.."),
class_name = env$..type..
)
env |
Environment. The destination environment. |
... |
Environments. Source environments. |
avoid |
Character. Names that don't want to be copied. |
class_name |
Character. Name of the class the method is defined.
This is important for |
Multiple classes or instances can be provided in ...
, where the right one
will override the left one if they have the same attribute or method name.
Attributes or methods that don't want to be copied can be specified in
avoid
.
Return the object itself.
test <- new.env()
names(BASE)
copy_attr(test, BASE, avoid = c("..method_env..", "..init_call..", "..dir.."))
names(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.