Hi,

I have  a function that takes in a dataset ( a matrix of m rows by n
columns), and five additional "constant" parameters, p1,p2,y1,y2,y3. The
function perform a series of operations and transformations on the
dataset, and returns a table of results.

I have tested the function repeatedly and it works fine.

However, I would like to generate a grid of results from myfunction for
different values of two of the input parameters: p1, and p2.

I have tried using for loops, and they work, but the computation time is
a too long.  I would like to use the apply/lapply/tapply functions to
avoid using for loops, what ever works !!!

Can someone recommend how to use these function to parameterize only a
subset of the inputs into the function, i.e p1, and p2?

Any tips/recommendations will be appreciated.



myfunction = function (dataset, p1,p2,y1,y2,y3)
{

Line1
Line2
Line3
::::::::
:::::::
:::::::
Return(res.table)
}




	[[alternative HTML version deleted]]

