run a function with multiple values for more than one arguments that are not the first ones

前端 未结 2 1106
予麋鹿
予麋鹿 2021-01-07 02:40

In R, if I have a function

myfun<-function(ys, T, N, beta, gamma, sigma) {...}

where beta and gamma are scalars.

If I have fixe

2条回答
  •  清歌不尽
    2021-01-07 03:28

    Look at the mapply and Vectorize functions along with expand.grid for the all combinations part.

提交回复
热议问题