You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's sometimes useful to give the user control over default values, so that they can set once per session or once for every session in their `.Rprofile`.
To do so, use `getOption()` in the default value.
Note that this pattern should general only be used to control the side-effects of a function, not its compute value.
The two primary uses are for controlling the appearance of output, particularly in `print()` methods, and for setting default values in generated templates.
Related patterns:
- If a global option affects the results of the computation (not just its side-effects), you have an example of @sec-inputs-explicit.