Hi, Does anyone know if exists a similar funcion to %in% from Hmisc S-plus library in R? Thank you -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Juan Ramon Gonzalez" <jrgonzalez at ico.scs.es> writes:> Hi, > > Does anyone know if exists a similar funcion to %in% from Hmisc S-plus > library in R?What does it do in Hmisc? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 10 Jun 2002, Juan Ramon Gonzalez wrote:> Does anyone know if exists a similar funcion to %in% from Hmisc S-plus > library in R?As far as I know that is essentially the same as the binary operator %in% which is part of R ... and S+6.1. Hmisc for R is (I believe) available from Dr Harrell's site. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, Jun 10, 2002 at 04:02:29PM +0200, Peter Dalgaard BSA wrote:> What does it do in Hmisc?almost the same as in "base":> get("%in%")function (x, table) match(x, table, nomatch = 0) > 0> library(Hmisc)*** output flushed ***> get("%in%")function (a, b) { if (is.factor(a) & is.numeric(b)) { warning("a is factor, b is numeric. Assuming b is coded factor values") a <- oldUnclass(a) } else if (is.numeric(a) && is.factor(b)) { warning("a is numeric, b is factor. Assuming a is coded factor values") b <- oldUnclass(b) } match(a, b, nomatch = 0) > 0 }> oldUnclass.Primitive("unclass") PM -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._