From p.dalgaard@biostat.ku.dk  Thu Mar 25 13:49:58 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 25 Mar 1999 14:49:58 +0100
Subject: [R] Change of parsing parameters to functions between 0.63.1  and 0.63.3 ?
In-Reply-To: Martin Maechler's message of "Thu, 25 Mar 1999 14:12:48 +0100"
References: <Pine.GSO.4.05.9903241827480.6272-100000@auk.stats> <x2lnglzrn0.fsf@blueberry.kubism.ku.dk> <199903251312.OAA06684@sophie.ethz.ch>
Message-ID: <x2soat4r21.fsf@blueberry.kubism.ku.dk>

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


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