
Last chance! 50% off unlimited learning
Sale ends in
Setting and resetting options is lengthy in command mode. WithOptions()
allows to evaluate a function with temporary set options.
WithOptions(optlist, expr)
a list with new option settings.
the expression to be evaluated
the function result
# NOT RUN {
# 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