hesim-dev / hesim

Health economic simulation modeling and decision analysis
https://hesim-dev.github.io/hesim/
62 stars 15 forks source link

hesim shiny app example #98

Open rhart1 opened 1 year ago

rhart1 commented 1 year ago

Hi Devin and Jeroen, I have added my shiny app example to the repo, where users can run it via app.R. I have also added a function to the R folder in case you want to add a call to it as a function within hesim. There are a fair number of package dependencies so I'm not sure if this would be ideal, but thought to add it anyway. I didn't use any build functions, I have just imported the scripts for you to review. The large number of packages are mainly for displaying the outputs (survminer for displaying onc3 data nicely, DT for datatables, rmarkdown etc), as in the short course I wanted to encourage attendees to focus as much on their outputs as on their functionality to aid in transparency, and I wanted to provide a few examples of this. If there are some that you feel are unnecessary or could be simplified further for this then let me know. I had also included an example of generating reports using rmd from both the script version and the app version (using the same rmd to demonstrate), which may or may not be something you'd want to include. Let me know if you have any questions or if there are amendments you think would be particularly useful. Many thanks Rose

codecov-commenter commented 1 year ago

Codecov Report

Merging #98 (18db654) into main (a6d44dd) will decrease coverage by 0.44%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   93.15%   92.70%   -0.45%     
==========================================
  Files          64       65       +1     
  Lines        5665     5690      +25     
==========================================
- Hits         5277     5275       -2     
- Misses        388      415      +27     
Impacted Files Coverage Δ
R/shinyIndivCtstm.R 0.00% <0.00%> (ø)
src/psm.cpp 93.18% <0.00%> (-0.06%) :arrow_down:
R/ctstm.R 91.92% <0.00%> (ø)
src/cea.cpp 100.00% <0.00%> (ø)
R/tpmatrix.R 95.43% <0.00%> (ø)
R/summarize.R 92.53% <0.00%> (ø)
R/deprecated.R 76.36% <0.00%> (ø)
R/hesim_data.R 92.95% <0.00%> (ø)
R/input_mats.R 91.45% <0.00%> (ø)
R/sim-general.R 90.90% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dincerti commented 1 year ago

Hi @rhart1, thanks for the PR. To start, can you fix the two warnings identified by the R CMD check and the note:

  Non-standard file/directory found at top level:
    'Rplots.pdf'
rhart1 commented 1 year ago

Hi, I made a few changes but I think there was one left. Could you please re-run the workflow?

rhart1 commented 1 year ago

I have added the changes to make it work with devtools::check() on my machine. Please re-run the workflow to check this is replicated here