formals {base} | R Documentation |
formals(fun=sys.function(sys.parent()))
If fun
is a function then the formal argument list to that
function is returned.
If fun
is a character string then the function with that name
is found and used.
If fun
is not specified then the function calling formals
is used.
It is currently not possible to set the formals of a function.
args
length(formals(lm)) # the number of formal arguments
names(formals(boxplot)) # formal arguments names