As with the rest of base R, the naming conventions for options are a bit... inconsistent.
To take a few examples from the documentation:
add.smooth
askYesNo
matprod
PCRE_limit_recursion
Yikes!
So, Is there an established convention for option names in/adjacent to the tidyverse? My initial suspicion was that one should follow the standard for object names:
Variable and function names should use only lowercase letters, numbers, and
_
. Use underscores (_
) (so called snake case) to separate words within a name.
This style is seen in some packages like r-lib/keyring
:
backend <- getOption("keyring_backend", "")
However in (for example) devtools the convention seems to be to use library.option.name
as in revdep_check
:
libpath = getOption("devtools.revdep.libpath"),
Is there a preferred convention for options going forward?