Search notes:

R function: formals

func <- function (paramOne, paramTwo = 42, paramThree = 'hello World') {
  NULL; 
}

params <- formals(func);
typeof(params);
#
#  pairlist


class(params);
#
#  pairlist

for (param in names(params)) {
  cat(param, ': ', params[[param]], "\n");
}
#
#  paramOne :   
#  paramTwo :  42 
#  paramThree :  hello World 
Github repository about-r, path: /functions/formals/formals.R

See also

Functions and arguments
body, environment
Index to (some) R functions

Index