Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timcdlucas/574a8d135ee0c792d04d20f3630fa18d to your computer and use it in GitHub Desktop.
Save timcdlucas/574a8d135ee0c792d04d20f3630fa18d to your computer and use it in GitHub Desktop.
ad.surv.intercept.vec <- c(0.99 * ad.surv.intercept, 1.01 * ad.surv.intercept)
ad.surv.temp.vec <- c(0.99 * ad.surv.temp, 1.01 * ad.surv.temp)
# Going to end up being...
# 5 runs. 1 with everything at the mean, 2 new ad.surv.intercept and 2 new ad.surv.tmep
N <- 5
df <- data.frame(rep(ad.surv.intercept, N), rep(ad.surv.temp.vec, 5))
df[1:2, 1] <- ad.surv.intercept.vec
df[3:4, 2] <- ad.surv.temp.vec
tic()
results <-
lapply(1:N, function(x)
results = run_simulation(df[x, 1],
df[x, 2],
ad.surv.pack,disp.intercept,disp.pack.size,IBI.intercept,IBI.tempcoef,IBI.pups,
pup.intercept,pup.pack.size,juv.surv.intercept,juv.surv.temp,juv.surv.litter,
meantemp,actual.meantemp,number.of.packs,n.steps,repeats, burntime)
)
toc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment