BiologicalRecordsCentre / BRCindicators

An R package for creating indicators from trends data
4 stars 11 forks source link

rescaleYr in bma() #4

Open drnickisaac opened 6 years ago

drnickisaac commented 6 years ago

I have modified the code in bma() Previously, there was an argument rescaleYr1 with a default value of TRUE I've replaced this with an argument rescaleYr with a default value of 1. In the new version, it allows the indicator to be set to zero at some year other than 1.

Existing code should be compatible with this change unless rescaleYr1 was set to FALSE. It can be made compatible by replacing rescaleYr1 with rescaleYr in the function call. (any other formulation would have used the same default (1 = TRUE) and report that rescaleYr1 is an unused parameter.

However, I'd appreciate @AugustT checking for unintended consequences.

AugustT commented 6 years ago

I'll have a think

AugustT commented 6 years ago

@drnickisaac This is going to be okay. Users of old code will get the error as you suggest rescaleYr1 is an unused argument. Make sure you document the new parameter in the roxygen comments at the top of the script and once you have pushed your change put in a pull request to bring in your change, then we can close this issue.