-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow collapseMatrix to collapse non-adjacent stages & remove rearrangeMatrix #25
Comments
Hi @patrickbarks, |
That makes sense, I'll leave I think there are a few MPMs where inter-reproductive stages are legitimate, and appropriately ordered by the author (e.g. doi.org/10.2307/3061069), in which case moving them to the right inappropriately swaps growth and retrogression. Perhaps we can just add a warning to the documentation to this effect. (Side note: I think there are other scenarios where the distinction between growth/retrogression is tricky, such as when an MPM includes a dormant stage, or when the MPM incorporates additional states such as sex, management status, disease status, etc. Still thinking about how to deal with some these — particularly dormancy.) |
That's a good point, but luckily a rather easy one to take care of. See what I've done here, where dorm is: dorm <- which(compadre$matrixClass[[i]]$MatrixClassOrganized=="dorm") one could do the same thing about seedbank dynamics as I do with going into, staying dormant and awakening from dormancy (below), but going into, staying in seedbank, and germinating from seedbank w something like: propdorm <- which(compadre$matrixClass[[i]]$MatrixClassOrganized=="prop") vitalRate <- function(matU, matF, matC, dorm){
} |
Well alright then! Now the challenge is to incorporate this idea into our functions (potentially including |
In addition to converting the 'collapse' argument of
This would allow the output of (This idea is already suggested within |
collapseMatrix
is currently written in a way that prevents a user from collapsing non-adjacent stages. Specifically, thecollapse
argument is a character vector whose elements must reflect single stages or sequences of adjacent stages, e.g.collapse <- c('1', '2-4', '5')
I suggest we change
collapse
to alist
, to allow the user to collapse non-adjacent stages, e.g.I think this would make
rearrangeMatrix
unnecessary, because it's only function is to move any inter-reproductive stages to the right side of a matrix, to segregate reproductive and post/non-reproductive stages ahead of collapsing.If we remove
rearrangeMatrix
,reprodStages
can be updated to identify inter-reproductive stages (it already takes the required arguments, i.e.reproStages
).The text was updated successfully, but these errors were encountered: