use_method | R Documentation |
This function makes a copy of the function, then set the evaluation environment to the container of the object environment.
use_method(env, fn, container_name = "..method_env..")
env |
Environment. Object. |
fn |
Function. Method. |
container_name |
Character. Name of the container. |
A method.
TEST <- new_class(class_name = "TEST")
register_method(TEST, ..str.. = function() "test")
test <- TEST$instantiate(dist = "uniform", prm = list(a = 1, b = 2))
test$..str..()
# Use method `..str..` from BASE class
use_method(test, BASE$..str..)()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.