Skip to content

Instantly share code, notes, and snippets.

@stormxuwz
Created March 12, 2015 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stormxuwz/f641299b43a96298a12e to your computer and use it in GitHub Desktop.
Save stormxuwz/f641299b43a96298a12e to your computer and use it in GitHub Desktop.
The three-dots construct in R
test_function_1 <- function(a=1){
cat("a is here",a)
}
test_function_2 <- function(b,...){
test_function_1(...)
}
test <- function(a,b){
test_function_2(b,a)
}
test(10,20) # should print 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment