Closed ben-wetherill closed 2 years ago
I edited the logic above.
I think currently only an issue for tabMWRacc().
@ben-wetherill I think it's fixed now for the tabMWRacc
output if type = "summary"
, check out the updated vignette: https://massbays-tech.github.io/MassWateR/articles/qcoverview.html#quality-control-for-accuracy
And just to verify, the logic uses the parameters from the DQO file for frequency and completeness even for the accuracy tables, correct?
Yes, the DQOfrecom file should be used to define parameters for all tables, including accuracy. Since the DQOfrecom file has only one row per parameter, this is easier than using the DQOacc file, and it keeps all tables aligned.
The logic isn't quite working yet. All parameters are now showing, but there are three issues:
@ben-wetherill It should be corrected now, please havea look when able.
These all look good now.
There is one final scenario. What if a parameter is in the results and in dqofrecom but not listed in dqoacc? In this case, it shows up in tabMWRacc(type="summary") with a 0 in the Number of QC checks row. This isn't quite correct if there were QC checks in the data, but I'm thinking it is acceptable since the QC checks can't be evaluated without the dqoacc file. The user would see the 0 and fix the dqoacc file. I think this is fine.
tabMWRfre(resdat,dqofrecomdat,type = "summary") and tabMWRacc(resdat,dqoaccdat,type = "summary",frecom = dqofrecomdat) should show a row for each relevant parameter, regardless of whether they have QC data or not. This is not currently happening for tabMWRacc. I think it is correct for tabMWRfre.
Relevant parameters are all parameters that are in the dqofrecom file and also have Sample-Routine or Field Msr/Obs activity.
tabMWRcom(resdat,dqofrecomdat), tabMWRfre(resdat,dqofrecomdat,type = "percent"), and tabMWRacc(resdat,dqoaccdat,type = "percent") should show a row for each relevant parameter. I think this is currently correct.