sub_fn_body_name | R Documentation |
This function substitute all old_names
with new_names
in a function
body, and drops all the attributes.
sub_fn_body_name(fn, old_name, new_name)
fn |
Function. |
old_name |
Character. Name that needs to be replaced. |
new_name |
Character. Replacement of the old name. |
A function.
body()
a <- function() self$x + self$y
a
sub_fn_body_name(a, "self", "this")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.