When I'm using a new function, the documentation/vignettes give an overview of how the function works, but often do not list all of the possible options for every argument.
There must (?) be a command which lists all of the valid options for an argument? After lots of Googling there are lots of answers to the question of how to list all the possible arguments of a function (args, formals etc), but nothing I can find which lists all the possible options of an argument?
For example if I type formals(lmer)
or args(lmer)
, it just list the functions and the defaults, not all the possible options.
How can I display all the possible options that an argument can take?
Since I posted this question I have found two useful ways to find out more info, the first is to use the str() command on the function, for example:
str(acf)
function (x, lag.max = NULL, type = c("correlation", "covariance", "partial"), plot = TRUE, na.action = na.fail,
demean = TRUE, ...)
Alternatively, in R Studio you can inspect the source code of any function by selecting it with your cursor and pressing F2.