powered by
Setting and resetting options is lengthy in command mode. WithOptions() allows to evaluate a function with temporary set options.
WithOptions()
WithOptions(optlist, expr)
the function result
a list with new option settings.
the expression to be evaluated
Thomas Lumley <t.lumley@auckland.ac.nz>
options, getOption
options
getOption
# original: print((1:10)^-1) # with new options WithOptions(list(digits=3), print((1:10)^-1))
Run the code above in your browser using DataLab