apply(mymatrix, 1, function(x) myfun(x[1], x[2], x[3]))

On Mon, 30 Jun 2003, Maarten Speekenbrink wrote:

> Suppose I have a function which takes three arguments. I would like to
> repeatedly apply the function, using a matrix N*3 in which each row
> supplies the three argements for the function. Is this possible? Thank
> you for your help in advance!
> 

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to