LandR icon indicating copy to clipboard operation
LandR copied to clipboard

.createCohortData not doing what it says it does?

Open CeresBarros opened this issue 6 years ago • 5 comments

.createCohortData is supposed to (among other things) message(blue("Set B to 0 where cover > 0 and age = 0, because B is least quality dataset")). However this doesn't seem to be enforced in the code. Both B (biomass) and age are indeed being corrected (to 0) when cover == 0. However, having cover > 0 and age == 0 doesn't seem to be assessed, nor to influence/correct B to 0.

CeresBarros avatar Feb 14 '20 20:02 CeresBarros

We need a table of all-way combinations. Make sure all cases are covered as desired.

On Fri, Feb 14, 2020, 12:09 PM Ceres Barros [email protected] wrote:

.createCohortData is supposed to (among other things) message(blue("Set B to 0 where cover > 0 and age = 0, because B is least quality dataset")). However this doesn't seem to be enforced in the code. Both B (biomass) and age are indeed being corrected (to 0) when cover == 0. However, having cover > 0 and age == 0 doesn't seem to be assessed, nor to influence/correct B to 0.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PredictiveEcology/LandR/issues/37?email_source=notifications&email_token=AAIMVW47WSOKMT4UXWDDVRDRC327VA5CNFSM4KVO6XF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INVLCVQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIMVW6C5OBL3NNTSAG3STTRC327VANCNFSM4KVO6XFQ .

eliotmcintire avatar Feb 18 '20 14:02 eliotmcintire

Just noticed that the described behaviour is enforced at the end of the makeAndCleanInitialCohortData call (after the .createCohortData call). However, I suggest that it is "copied" to .createCohortData, for consistency with the message and the other checks/fixes that .createCohortData makes.

I also wonder if it makes sense to leave cover > 0 when age == 0 (and B is forced to 0). Thoughts?

CeresBarros avatar Feb 18 '20 23:02 CeresBarros

see https://github.com/PredictiveEcology/LandR/pull/38

CeresBarros avatar Feb 18 '20 23:02 CeresBarros

has this been resolved?

achubaty avatar May 09 '24 21:05 achubaty

I don't think so

CeresBarros avatar May 10 '24 16:05 CeresBarros