On Jun 1, 2012, at 00:30 , Mike Hilt wrote: > > Could someone help me out and let me know what ‘%?%’ > (where ? = a single letter in a 3 character string with ‘%’ > being the 1st and 3rd characters), and/or ‘%+%’ does in > R code/function?
They are just a vehicle for defining binary operators: functions of two variables but called using infix notation. a %foo% b is equivalent to `%foo%`(a,b) just like 2 + 2 is > `+`(2,2) [1] 4 Like any other function, they do whatever you define them to do, but some are predefined, notably %*% (matrix multiply), %/%, %% (integer divide and remainder), and some packages add their own operators like %+%. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.