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

Remove standardizedVitalRates #23

Closed
patrickbarks opened this issue Sep 3, 2018 · 1 comment
Closed

Remove standardizedVitalRates #23

patrickbarks opened this issue Sep 3, 2018 · 1 comment

Comments

@patrickbarks
Copy link
Collaborator

standardizedVitalRates calls four other Rage functions in sequence: rearrangeMatrix, reprodStages, collapseMatrix, then vitalRates. The first 3 convert an MPM to a standardized format, and the 4th extracts averaged vital rates.

I see no reason to group these 4 components into a single function:

  • The main reason is that each component function has it's own set of optional arguments (e.g. reprodStages has different options for dealing with propagule and post-reproductive stages, vitalRates has different options for how to split and weight vital rates). standardizedVitalRates doesn't currently support any of these — it simply uses the defaults of the component functions. Adding this support would make standardizedVitalRates overly complicated, in my opinion.

  • Second, the four component functions may each fail for different reasons. Combining them in a single function makes debugging more difficult.

  • Third, a user that wants to extract vital rates from a standardized matrix is likely to want to calculate other things from that standardized matrix as well. But the standardized matrix is not returned by standardizedVitalRates.

Therefore, I suggest we remove standardizedVitalRates and encourage users to use the four component functions separately (e.g. with an example on the website or vignette). We could alternatively bundle the first 3 component functions into a new function (e.g. standardizeMatrix), which I think would be more useful to users, and not quite as complicated.

@jonesor
Copy link
Owner

jonesor commented Sep 12, 2018

Looks good.

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

No branches or pull requests

2 participants