Hi all R-users,

I'm trying to using apply function to input a range of values into a function I wrote. I wrote a function with 4 information needed. I would like to make 2 of them fixed and the other 2 random (but with specified values).
I would like to replicate the function 10000 times.
I was thinking about using loop function but which is really slow, therefore I transfer to apply function.
But I got stucked. Could anyone help me?

The question could be illustrated as follows,
Target function: fun(F1,F2,R1,R2)
R1 has values 1, 2, 3, 4, 5
R2 has values -1, -2, -3, -4, -5
F1=10
F2=100
There would be 25 conditions. I would like to avoid using loop to get the result.
Could anyone give me some precious suggestion?

Thank you!!!!

Best,
Yen

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to