Skip to content

Instantly share code, notes, and snippets.

@mittenchops
Created April 12, 2013 19:31
Show Gist options
  • Save mittenchops/5374496 to your computer and use it in GitHub Desktop.
Save mittenchops/5374496 to your computer and use it in GitHub Desktop.
Remembering syntax for Reduce in R.
add <- function(x,y)(return(x+y))
Reduce(add,c(1,2,3,4,5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment