massbays-tech / MassWateR

R package for working with Massachusetts surface water quality data
https://massbays-tech.github.io/MassWateR
Creative Commons Zero v1.0 Universal
11 stars 3 forks source link

Create function to compile qc outputs in a report with user inputs #20

Closed fawda123 closed 2 years ago

fawda123 commented 2 years ago

Need to call rmarkdown render to word file with parameters for results and dqo files, additional arguments based on user preferences, e.g., warnings, font sizes, etc. The rmarkdown templates lives in inst/rmd.

ben-wetherill commented 2 years ago

I tested this qcMWRreview() function. This is pretty fancy!

I received a warning message "package 'flextable' was built under R version 4.0.5 ".

Here are some other things I noticed:

ben-wetherill commented 2 years ago

Should we give the user the ability to define the name of the output file?

fawda123 commented 2 years ago

@ben-wetherill the remaining issues for the review report should all be addressed now, including the option to change the file name. Please have a look when able and close the issue if everything looks good.

ben-wetherill commented 2 years ago

All of the previous issues have been resolved.

A couple new formatting requests: Actually, I'm a confused, because the first time I ran the report, I had the following issues. But the second and third times I ran it, these issues didn't appear. Everything was fine, except number 5. So, only number 5 needs to be adjusted.

  1. Can the table rows be made narrower? It looks like all of the text is set up with 5pt spacing before and after each paragraph, which makes the tables quite long. I think it should be reduced to 0pt spacing before and after. And, actually, row height might be a good parameter to allow the user to define in the function. If so, a minimum row height of 0.2" would be a good default.
  2. In QC frequencies, it would be good to make the Parameter column width 1.15" so that Sp Conductance doesn't wrap. That is the longest common parameter. Also, same in the QC frequencies percent table.
  3. In QC frequencies, you can put a space in the header "Number of Dups/Blanks/ Spikes" before Spikes so that the column doesn't have to be so wide.
  4. In QC accuracy percent table, make the Parameter column width 1.15".
  5. In Data Completeness table, make the Parameter column width 1.15". Also, add a space in the "Hit/ Miss" header so that the column doesn't need to be so wide.
  6. In the QC Raw Data table, make the Parameter column width 1.15".
fawda123 commented 2 years ago

@ben-wetherill thanks, I also noticed that issue with the formatting on first render. I don't know why it only happens then, but it's fixed now. I also made the modifications to the completeness table.

ben-wetherill commented 2 years ago

Everything looks good.