Closed moodymudskipper closed 5 years ago
strictly is a specific case of setting_options and is named awkwardly, it could be renamed setting_warn as in https://github.com/moodymudskipper/tags/issues/24 but it could also just be removed.
strictly
setting_options
setting_warn
setting_options(warn=-1)$sqrt(-1)
Either :
I tend to favor the latter now, though it ends up a bit more heavy on the eye :
setting_options(list(warn=-1))$sqrt(-1) # compare to setting_options(warn=-1)$sqrt(-1) setting_warn(-1)$sqrt(-1) strictly(-1)$sqrt(-1)
But if its use needs to be repeated there's nothing wrong with :
TAG <- setting_options(list(warn=-1)) TAG$sqrt(-1)
We now have using_options wrapped around withr::with_options, (note: different from rlang::with_options! but same functionality). This works:
using_options
withr::with_options
rlang::with_options
using_options(list(warn=-1))$sqrt(-1)
strictly
is a specific case ofsetting_options
and is named awkwardly, it could be renamedsetting_warn
as in https://github.com/moodymudskipper/tags/issues/24 but it could also just be removed.setting_options(warn=-1)$sqrt(-1)
Either :
I tend to favor the latter now, though it ends up a bit more heavy on the eye :
But if its use needs to be repeated there's nothing wrong with :