From ripley@stats.ox.ac.uk  Sun Oct 31 16:36:33 1999
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Sun, 31 Oct 1999 16:36:33 +0000 (GMT)
Subject: diag
Message-ID: <Pine.GSO.4.05.9910311620090.12623-100000@auk.stats>

A change to diag() between 0.65.0 and 0.65.1 which seems undocumented in
the logs (apparently revision 1.3.2.1, `diag names') introduced

    if (is.array(x)) 
        stop("first argument is array, but not matrix.")

which has broken the code in rpart. This looks wrong to me, as diag used to
cope happily with a single-dimensional array. Such things occur quite
often as the output from table().

Is there any reason not to make this

    if (length(dim(x)) > 2)

which seems the intention?  Martin (if I have decoded the cvs diffs
correctly)?

Brian

-- 
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


diag
Prof Brian D Ripley