R Cheatsheet: Functions (1)
#A Simple Function. Including a Default value for second Argument
add2<- function(x,y=0){
x+y
}
#Another example of a function. This one calculates those elements of a
#vector greater than a value
above<- function(x, n=10){
use<-x>n
x[use]
}