Feature request: set_config()
invisibly returns prior values like options()
#11
Labels
feature
a feature request or enhancement
options()
invisibly returns its prior value. This can be helpful for use in a single test or function, with lines like:set_config()
could benefit from being able to use a similar workflow. The most obvious case would be in unit testing, where this could aid cleanup. It could also be useful when one function requires a different configuration than the rest of the package.In my own package, I use the following code to achieve this:
It's certainly not the most elegant, but it seems to get the job done.
The text was updated successfully, but these errors were encountered: