From antonio.fabio at gmail.com  Wed Dec  5 18:45:28 2007
From: antonio.fabio at gmail.com (Antonio, Fabio Di Narzo)
Date: Wed, 5 Dec 2007 18:45:28 +0100
Subject: [Rd] Wishlist: mention Vectorize in 'outer' man page (PR#10490)
In-Reply-To: <4756C696.6060603@biostat.ku.dk>
References: <20071205143516.C21592834612@mail.pubhealth.ku.dk>
	<4756C2BA.9090404@biostat.ku.dk> <4756C696.6060603@biostat.ku.dk>
Message-ID: <b0808fdc0712050945t65d56bceuced856ad22845e93@mail.gmail.com>

Wow.
Now it seems much more explicit and clear than before. Thanks!

2007/12/5, Peter Dalgaard <P.Dalgaard at biostat.ku.dk>:
> Peter Dalgaard wrote:
> > maechler at stat.math.ethz.ch wrote:
> >
> >>>>>>> antonio fabio <antonio.fabio at gmail.com>
> >>>>>>>     on Tue,  4 Dec 2007 20:25:21 +0100 (CET) writes:
> >>>>>>>
> >>>>>>>
> >>     > ------=_Part_13308_28087893.1196796187581
> >>     > Content-Type: text/plain; charset=ISO-8859-1
> >>     > Content-Transfer-Encoding: 7bit
> >>     > Content-Disposition: inline
> >>
> >>     > Here a possible patch. What do you think about it?
> >>
> >> attachments don't make it through R-bugs -> R-devel correctly.
> >>
> >> Please use cut & paste instead.
> >>
> >>
> > base64 -di is not THAT hard. I'll apply it to R-devel
> >
> (The patch, not base64, or course...).
>
> Done. Actually, I ended up polishing a bit more:
>
> --- src/library/base/man/outer.Rd       (revision 43598)
> +++ src/library/base/man/outer.Rd       (working copy)
> @@ -26,13 +26,15 @@
>    \item{\dots}{optional arguments to be passed to \code{FUN}.}
>  }
>  \details{
> -  \code{FUN} must be a function (or the name of it) which expects at
> -  least two arguments and which operates elementwise.
> -
>    \code{X} and \code{Y} must be suitable arguments for \code{FUN}.  Each
>    will be extended by \code{\link{rep}} to length the products of the
>    lengths of \code{X} and \code{Y} before \code{FUN} is called.
>
> +  \code{FUN} is called with these two extended vectors as
> +  arguments. Therefore, it must be a vectorized function (or the
> +  name of one), expecting at
> +  least two arguments.
> +
>    Where they exist, the [dim]names of \code{X} and \code{Y} will be
>    copied to the answer, and a dimension assigned which is the
>    concatenation of the dimensions of \code{X} and \code{Y} (or lengths
> @@ -54,7 +56,8 @@
>  \seealso{
>    \code{\link{\%*\%}} for usual (\emph{inner}) matrix vector
>    multiplication;
> -  \code{\link{kronecker}} which is based on \code{outer}.
> +  \code{\link{kronecker}} which is based on \code{outer};
> +  \code{\link{Vectorize}} for vectorizing a non-vectorized function.
>  }
>  \examples{
>  x <- 1:9; names(x) <- x
>
> --
>    O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907
>
>
>


-- 
Antonio, Fabio Di Narzo
Ph.D. student at
Department of Statistical Sciences
University of Bologna, Italy



[Rd] Wishlist: mention Vectorize in 'outer' man page (PR#10490)
Antonio, Fabio Di Narzo