BoulderCodeHub / RWDataPlyr

R package to read and manipulate data from RiverWareTM
3 stars 5 forks source link

should missing slot really cause a failure? #38

Closed rabutler closed 7 years ago

rabutler commented 8 years ago

Currently, if a slot is not found in an rdf, there is a failure? Should we add an option to only post a warning if the slot is not found, but continue to process the other slots/rdfs?

rabutler commented 7 years ago

There are good reasons to both fail and to continue depending on the instance. So, will add an argument which if TRUE will cause failure if the slots are not found, and if FALSE will post a warning that the slot is not found in the file. The default will be FALSE.

rabutler commented 7 years ago

Addressed by adding a findAllSlots parameter to getDataForAllScens() and supporting functions.

If it's TRUE, then it will error if it cannot find all slots, and if FALSE, it will return -99 for the year, trace, and value for one row of that slot.

addressed and tested in 4064f8761475272b2ddf993b216d7d83566e3842, e4c85a63c6967d0763a46aa26180eef9088aba74, 4097c9dedc7529308ec424c3005c47417410a465, and 6b8bfb09c65b276f45f67bace45383740d513846