ripley@stats.ox.ac.uk
1999-Apr-13 17:29 UTC
outer fails with group generic operations on factors (PR#166)
B <- A <- factor(c("a", "b")) outer(A, B, "!=") Warning: "FUN" not meaningful for factors [,1] [,2] [1,] NA NA [2,] NA NA Now, this used to work in 0.63.2, but someone `improved' outer. There it did an implicit as.numeric. The problem is that get in match.fun does not understand group generics, and gets Browse[1]> FUN .Primitive("!=") This _should_ launch Ops.factor, but does not.> "!="(A, B)[1] FALSE FALSE> get("!=")(A, B)Warning: "" not meaningful for factors [1] NA NA This causes misclass.tree(, detail=F) in package tree to fail. --please do not edit the information below-- Version: platform = sparc-sun-solaris2.6 arch = sparc os = solaris2.6 system = sparc, solaris2.6 status = status.rev = 0 major = 0 minor = 64.0 year = 1999 month = April day = 8 language = R Search Path: .GlobalEnv, Autoloads, package:base -- Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
1999-Apr-13 18:03 UTC
outer fails with group generic operations on factors (PR#166)
ripley@stats.ox.ac.uk writes:> Browse[1]> FUN > .Primitive("!=") > > This _should_ launch Ops.factor, but does not. > > > "!="(A, B) > [1] FALSE FALSE > > get("!=")(A, B) > Warning: "" not meaningful for factors > [1] NA NA >Actually, it *does* launch Ops.factor, but it gets confused by garbage in .Generic. The bug is this line in DispatchGroup: sprintf(generic, "%s", CHAR(PRINTNAME(CAR(call)))); which presumably should rather look at the "op" arg. I'll have a closer look. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Possibly Parallel Threads
- (PR#1577) is.na<- coerces character vectors to be factors
- cbind is not generic as claimed, omits labels where S has them (PR#239)
- Problem in "configure" for Solaris (cc) -- solved (partly) --
- S4 group generic Complex not working (PR#4483)
- maketitle garbles the title in package nnet (PR#613)