Closed aylapear closed 1 year ago
This will close #163 and is tied to https://github.com/bcgov/shinyrems/issues/139
This looks great to me - I approve. Also @aylapear you should add yourself as a ctb.
Hi @aylapear - I was wondering if you could grant me temporary access to test your fork? I have a few WQ scripts I like to run as an extra test. If not I can pull first and then let you know if I run into anything.
Hi @KarHarker, there are two different ways you can access the code and install the package. Pick which option works for you better.
Run this line of code and it will install the package with the changes: remotes::install_github("poissonconsulting/wqbc@summarize_bug")
Go to the forked repo (https://github.com/poissonconsulting/wqbc), clone the repo, once on your computer switch to the summarize_bug
branch and then build the package.
The forked repo is public so you should be able to fully access it. Let me know if you have any issues.
Hi @aylapear - thanks. I was getting weird permissions errors when I was trying to clone it earlier so I thought the fork was private. But I got it sorted.
Your changes look good to me! One small thing - I am wondering about modifying the ncen column so that is shows the number of censored observations regardless of whether the user opts for the ml summary stats estimation. Right now when you use summarise_wqdata(x, censored=FALSE)
the ncen automatically defaults to 0. I think it makes more sense to still provide the ncen as the numbers of observations where the Value <= Detection Limit. @HeatherGranger any thoughts?
From what I understand what you're saying @KarHarker makes sense.
summarise_wqdata()
a try condition was added to catch when there is not enough data to use thecenmle()
function and it errors. Since the output of thecenmle
function is not an error but a cenmle classed objected, the try condition has been placed on the next function which throws a regular error when thecenmle
object doesn't have the enough data to generate themean
of the object.NA
except n, ncen, min and max which it provides from the data. This is helpful to retain as it can show the user that all the values were censored out or only a single data point remains for that site.shinyrems
app was tested and now the summary tab can be generated for many different combinations of sites and chemicals and not error out and require restarting the app