Might it be possible to tighten the definition of "is.qr". I noticed that after I mistakenly typed example(lm) # make lm object named lm.D9 qr.Q(lm.D9) which exhausted the heap memory and produced two warning messages. As an object of class "lm" has a "qr" component, "is.qr" failed to detect that "lm.D9" was not a "qr" object. The obvious thing might be to tighten the definition of "is.qr", perhaps "is.qr" <- function(x) all(c("qr", "rank", "qraux", "pivot") %in% names(x)) And may I add my congratulations to the core group. Cheers, Jonathan. --please do not edit the information below-- Version: platform = sparc-sun-solaris2.7 arch = sparc os = solaris2.7 system = sparc, solaris2.7 status = Patched major = 0 minor = 99.0 year = 2000 month = February day = 9 language = R Search Path: .GlobalEnv, package:mva, package:patches, Autoloads, package:base Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "JonR" == J C Rougier <J.C.Rougier@durham.ac.uk> writes:JonR> Might it be possible to tighten the definition of "is.qr". I JonR> noticed that after I mistakenly typed JonR> example(lm) # make lm object named lm.D9 JonR> qr.Q(lm.D9) JonR> which exhausted the heap memory and produced two warning JonR> messages. As an object of class "lm" has a "qr" component, JonR> "is.qr" failed to detect that "lm.D9" was not a "qr" object. indeed. yes, it should be tightened. JonR> The obvious thing might be to tighten the definition of "is.qr", JonR> perhaps JonR> "is.qr" <- function(x) all(c("qr", "rank", "qraux", "pivot") %in% JonR> names(x)) Just checked: S-plus 5.1 checks for qr and qraux only (but not just for the presence of the names, also !is.null(.) as we now do for $qr. It makes sense to have this a FAST function since it's called quite a few times in some calculations... maybe change current is.qr <- function(x) is.null(x$qr) to is.qr <- function(x) is.null(x$qr) && !is.null(x$rank) && !is.null(x$qraux) The current behavior is "according to documentation" so that would have to be updated as well. JonR> And may I add my congratulations to the core group. thank you Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._