[R] Pass an operator to function

randomcz randomcz at gmail.com
Wed Dec 1 03:54:03 CET 2010


Hi guys,

How to pass an operator to a function. For example, 

test <- function(a, ">", b)
{
      return(a>b) #the operator is passed as an argument
}

Thanks,

-- 
View this message in context: http://r.789695.n4.nabble.com/Pass-an-operator-to-function-tp3066627p3066627.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list