I sometimes meet the following code
foo <- function(x,y,...){
}
What is "..." ?
Is there any reference?
I sometimes meet the following code
foo <- function(x,y,...){
}
What is "..." ?
Is there any reference?
...
is used to pass optional additional arguments to a function. Here is one example :
foo <- function(x, y, ...) paste(x, y, ...)
foo('a', 'bcd')
#[1] "a bcd"
foo('a', 'bcd', 'aaa')
#[1] "a bcd aaa"
foo('a', 'bcd', 'aaa', 'def')
#[1] "a bcd aaa def"
The documentation of this is present at ?"..."
.