WithOptions | R Documentation |
Setting and resetting options is lengthy in command mode. WithOptions()
allows to evaluate a function with temporary set options.
WithOptions(optlist, expr)
optlist |
a list with new option settings. |
expr |
the expression to be evaluated |
the function result
Thomas Lumley <t.lumley@auckland.ac.nz>
options
, getOption
# original:
print((1:10)^-1)
# with new options
WithOptions(list(digits=3), print((1:10)^-1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.