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

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
25 Mar 1999 14:49:58 +0100


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)

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

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

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

*NOW* should we keep it?

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