[R] Change of parsing parameters to functions between 0.63.1 and 0.63.3 ?

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Thu, 25 Mar 1999 18:56:16 +0100


>>>>> "PD" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:

    PD> Martin Maechler <maechler@stat.math.ethz.ch> writes:
    PD> dimensional slices to get the names passed down [using
    PD> array(newX[,i], d.call, dn.call) with dn.call containing the names]
    >> 
    PD> ..should I consider that a bad move?
    >> ^^^^^^
    >> (your patch)
    >> Yes, I actually think
    >> your patch should be reverted ___ especially since it even breaks
    >> example(apply)

    PD> Oh sh...! I thought that "length(d.call) < 2" bit looked fishy. Forgot
    PD> (or whatever) that the 0 case was in fact possible.

    PD> But that is easily fixable, just don't do in the extreme case.
    PD> This seems to work better:

    PD> if ((i.vec <- length(d.call) < 2)) 
    PD> for (i in 1:d2) {
    PD> xi <- newX[, i]
    PD> if (length(dn.call) == 1) 
    PD> names(xi) <- dn.call[[1]]
    PD> ans[[i]] <- FUN(xi, ...)
    PD> }
    PD> else for (i in 1:d2) ans[[i]] <- FUN(array(newX[, i], d.call, dn.call), ...)

    PD> *NOW* should we keep it?

According to our general strategy  

   ``Be S compatible unless there's a good reason for NOT being..''

I think we should keep it.
I did some very limited CPU usage testing and the new code (compared to 0.63.3)
seems to increase CPU usage by less than 1%  (no std.err available on this :-)

---> committed -- including a new help-example exhibiting the new behavior

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum SOL G1;	Sonneggstr.33
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1086			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._