7
In R can be used '...' so that the function receives an undetermined number of arguments.
How to know which arguments were used in the function?
Example, if I wanted to print the arguments used.
imprimeArgumentos <- function(...) {
args <- #pega os argumentos contidos em ´...´
print(args)
}
The function shall function as follows:.
imprimeArgumentos(x=3, z=NULL, y=3)
$x
[1] 3
$z
NULL
$y
[1] 3