For curiosity's sake, and perhaps closer in keystrokes to R home, here's another version,
`%ni%` <- Negate(`%in%`) baptiste On Aug 5, 2010, at 5:30 PM, Ken Williams wrote: > Ha! Thanks. I should have a closer look at Hmisc in general. > > -Ken > > > On 8/5/10 10:25 AM, "David Huffer" <david.huf...@csosa.gov> wrote: > >> See Harrell's Hmisc package >> >> -----Original Message----- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On Behalf Of Ken Williams >> Sent: Thursday, August 05, 2010 11:20 AM >> To: r-help@r-project.org >> Subject: [R] A %nin% operator? >> >> [...] >> So I write a %nin% operator which I define as: >> >>> `%nin%` <- function (x, table) match(x, table, nomatch = 0L) == 0L > > -- > Ken Williams > Sr. Research Scientist > Thomson Reuters > Phone: 651-848-7712 > ken.willi...@thomsonreuters.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. ______________________________________________ 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.