outer fails with group generic operations on factors (PR#166)
ripley@stats.ox.ac.uk
ripley@stats.ox.ac.uk
Tue, 13 Apr 1999 19:29:17 +0200
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._