code for generating function times
dmcglinn opened this issue · comments
Dan McGlinn commented
nperm = 20
S = c(1e1, 1e2, 1e3)
N = c(1e3, 1e4, 1e5)
times = array(NA, dim = c(length(S), length(N)))
dimnames(times) = list(S, N)
for(i in seq_along(S)) {
for(j in seq_along(N)) {
times[i, j] = system.time(replicate(nperm, spec_sample_curve(
sim_thomas_community(S[i], N[j], 'lnorm'), method='rarefaction')))[1] / nperm
}
}
The above averages over 20 runs (nperm
value) for a given S and N value. Probably its a good idea to test this for a different pattern as well.
Jacob Wujciak-Jens commented
Hey thanks for you work on the package!
I just saw this issue and wanted to recommend the great {bench} package with the function press.