[Rd] Wishlist: mention Vectorize in 'outer' man page (PR#10490)

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Wed Dec 5 16:41:10 CET 2007


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



More information about the R-devel mailing list