# [R] Re: [S] [R/S] question re solution

Spencer Graves spencer.graves at pdf.com
Thu Sep 2 04:53:18 CEST 2004

<see below>

Erin Hodgess wrote:

>Dear R and S People:
>
>First, thank you to so many people for your help to my problem.
>
>Here is the solution:
>
>a <- 0.5*(outer(1:n3,1:n3,function(x,y,n2.){n2. - pmax(x,y)},n2.=n2))
>
>I have one final pesky question, please:
>During my experiments, I tried the following:
>
>a <- 0.5*(outer(1:n3,1:n3,function(x,y,n2.=n2){n2. - pmax(x,y)}))
>
>
In S-Plus, the function "outer" can't find "n2".  In the form

outer(1:n3,1:n3,function(x,y,n2.=n2){n2. - pmax(x,y)}), n2.=n2)

the value of "n2" is passed to "n2." as part of the "..."
argument.  Someone else mentioned Venables and Ripley (2000) S
Programming (Springer).  Please see this or some other discussion of the
"..." argument.

hope this helps.
spencer graves

>
>thank you!
>
>Sincerely,
>Erin Hodgess
>Associate Professor
>Department of Computer and Mathematical Sciences
>University of Houston - Downtown
>mailto: hodgess at gator.uhd.edu
>--------------------------------------------------------------------
>This message was distributed by s-news at lists.biostat.wustl.edu.  To
>...(s-news.. clipped)...

>
>

--
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567