Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code for generating function times #16

Open
dmcglinn opened this issue Oct 30, 2017 · 1 comment
Open

code for generating function times #16

dmcglinn opened this issue Oct 30, 2017 · 1 comment

Comments

@dmcglinn
Copy link
Member

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.

@assignUser
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants