-
Notifications
You must be signed in to change notification settings - Fork 3
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
make_ipm()
hangs when kernel_seq
is specified
#58
Comments
Oh, the other problem with this line is that it's not looking through the unique values of
? |
That is weird, I'll have to investigate that a bit more. How many iterations are you running it for? |
It completely hangs even with 10 iterations. It seems like grepl() doesn't need to look through the entire proto_ipm to figure out if the values in kernel_seq are reasonable. |
Yea, I just looked at the code you linked and it is definitely wrong. I'll get to that next week. Thanks for bringing this to my attention! |
Is there any reason this wouldn't do the trick?
I assume that would be faster. |
Or ditch the for-loop entirely?
|
Should be fixed in development version now, and am submitting to CRAN as I need a slew of updates for |
I'm iterating a general stochastic kernel sampled IPM and it hangs when I specify
kernel_seq
. The vital rate models are GAMs with a random effect ofyear
and in the IPMpredict()
is called withnewdata = data.frame(year = yr)
andpar_set_indices = list(yr = 2000:2009)
. I tracked the hanging down to this line of.make_usr_seq()
:https://github.com/levisc8/ipmr/blob/c40603ed76a53f58b7af09b2109823c9d826cf38/R/internal-make_ipm.R#L935
I don't understand why, but this call to
grepl()
is incredibly slow for my IPM. I don't quite understand what this line is doing or why it is so slow for my IPM but not noticeable for the one in the vignette. I assume there is a way to make this more efficient?The text was updated successfully, but these errors were encountered: