Name conventions for options



As with the rest of base R, the naming conventions for options are a bit... inconsistent.

To take a few examples from the documentation:



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 as in revdep_check:

  libpath = getOption("devtools.revdep.libpath"),

Is there a preferred convention for options going forward?


My sense of our convention is: package.option_name :grimacing:.

So I separate package name from option name with . and use snack_case for the option name, i.e. I separate words with _.


use snack_case for the option name

Snack case is the tastiest of cases.



Oops! Make that snake_case :snake:


Thanks, Jenny. That seems pretty reasonable to me. Is it worth me submitting an issue to the tidyverse style guide, or am I being a massive pedant?


I think it's fine to open an issue at, where I trust my view on option names will be recognized as the One True Way :joy: