Raster to terra update- KHuber#38
Conversation
| habitat_dynamics = NULL, | ||
| timesteps = 10, | ||
| replicates = 3, | ||
| timesteps = 3, |
There was a problem hiding this comment.
Why did you change the test values? timesteps and replicates.
Are the simulations running slower with the terra version of the package and this change is to stay under the maximum time limit of the CRAN checks? Old values breaking the tests? Or just tinkering?
|
|
||
| pop_dyn_kd_large <- population_dynamics(change = NULL, | ||
| dispersal = kernel_dispersal(exponential_dispersal_kernel(distance_decay = 8000), max_distance = 100000), | ||
| dispersal = kernel_dispersal(exponential_dispersal_kernel(distance_decay = 8000), max_distance = 1000), |
There was a problem hiding this comment.
Why have you reduced max_distance?
| dispersal = cellular_automata_dispersal(min_cells = 0, | ||
| max_cells = 10), | ||
| dispersal = cellular_automata_dispersal(min_cells = c(0, 0, 0), | ||
| max_cells = c(5, 10, 10)), |
There was a problem hiding this comment.
Why change these values? Is it just setting them age class specific?
Doi90
left a comment
There was a problem hiding this comment.
I've gone through the changes and they generally look fine, and I ran some tests locally to compare the numbers that come out of the raster vs terra versions of the package and they're identical. Nice work.
Before I merge this PR in though I've left a couple of questions about parameter value changes in the tests. Can you say why they got changed? If the simulations are running slower with terra such that they need to be reduced for stay under CRAN time limits then we'll need to look at ways to speed things back up.
|
Hi @Doi90, Thanks for posting your comments to the pull request. I believe the first two changes you noted were from me reducing testing time for my debugging, forgetting to switch back to original values. Apologies for not noting them in my original report out- I must have forgotten about those changes.
Full package check takes 667s, which is a little over 11 minutes, with the original parameter values. This may be slightly long for CRAN, but I will defer to you on this. I don't have easy access to perform a check on the original steps package (raster version) currently, so I will leave it up to you if you think the terra implementation is taking too long to run and needs more optimization. Thanks for your time reviewing this! Please keep me updated with anything else I can help with. Best, |
Raster to Terra updates.
Notable changes:
Passing all tests and checks prior to pushing. Documentation and helpfiles updated where appropriate.