Open sgaichas opened 4 months ago
It isn't clear if one of the argument is T and one is F, wheher they should both be T or both be F.
We should have a check_arguments
function as the first order of operations.
This will prevent the user having to wait for the data pull before being told the arguments were input incorrectly.
@slucey Any chance you can weigh in on this? Do you remember why there are two flags applyPropLand
and applyPropValue
?
Do they both have to be T or both F?
You could easily use the same variable for both and I probably should have. The reason it was developed this way was because value is not always pulled. It is true that you would never want to proportion value and not landings. The reverse would also be true as long as you were using the values. I don't remember writing the message flag above but Sarah is right that it should set the applyPropValue
to F in that case. This was sloppy coding on my part.
Solution: I will recode to a single flag.
see discussion thread
The message in the code indicates that
applyPropLand
andapplyPropValue
should not have different values (both should be T or both should be F)However, this code allows
applyPropLand
to be F andapplyPropValue
to be T if I'm reading it correctly:https://github.com/NOAA-EDAB/comlandr/blob/28b4c58683d35d0cdcc1b72f4b3eeda7242414a7/R/aggregate_area.R#L25-L28
Should it instead set
applyPropValue
to F ifapplyPropLand
is already F?Should line 27 be
And the message adjusted to say
applyPropValue
is being set to F?