[R] Parameter Matrix

Simeon Lisovski simeon.lisovski at me.com
Mon Oct 22 01:05:51 CEST 2012

 I would like to run a model (differential equations)
with a whole bunch of parameter combinations.

I think the best way of doing this is to put the model
function into a loop and set a matrix with the parameters:
Each row will represent the parameters for one loop. 

I know how to compile such a matrix (via another loop,
or by using rbind etc.). However I hope you guys may have 
a much better solution compiling such a matrix very quick
and straightforward.

Example (very simple):

a <- 1:2
b <- 5
c <- seq(1,10,5)

The Matrix should be:

a	b	c
1	5	1
1	5	6
2	5	1
2	5	6

Any ideas?

More information about the R-help mailing list