Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor measures shown in histogram #16

Open
jwildfire opened this issue Mar 25, 2020 · 2 comments · May be fixed by #45
Open

Refactor measures shown in histogram #16

jwildfire opened this issue Mar 25, 2020 · 2 comments · May be fixed by #45
Assignees

Comments

@jwildfire
Copy link
Contributor

Let user specify which measures are drawn when calling safetyHistogram(). Allow arrays or string. Multiple pages? Panels?

@jwildfire
Copy link
Contributor Author

I'd suggest adding settings$measure_values that takes a string ("Cholesterol") or a vector of strings (c("Cholesterol", "Diastolic Blood Pressure")) and then provides histograms for the specified measure(s).

Might also be nice to also add settings$page_layout that would let the user specify whether to show one plot per page or to use small multiples (probably via ggplot2 facet_grid). Could also cover that in a future issue though ...

@isaaczhao23
Copy link
Contributor

isaaczhao23 commented May 8, 2020

  • If measure_values is unspecified, defaults to first parameter. If one measure_value specified, prints 1 graph. If k measure_values specified, prints k graphs, 3 per row max.
  • If x limits specified (low_lim, up_lim), must be in same order as the measure_values
  • Couldn't get custom binwidth to work due to the nature of facet_wrap, but there seems to be potential solutions on stackoverflow
  • Plot size display would probably need to be done within UI of shinyapp itself. Not sure best approach for this

settings[["measure_values"]] = c("Bicarbonate","Chloride")
settings[["low_lim"]] = c(20,90)
settings[["up_lim"]] = c(35,120)

image

https://github.com/SafetyGraphics/safetyCharts/blob/IZ_dev/R/safety_histogram.R

@isaaczhao-alk isaaczhao-alk mentioned this issue May 21, 2020
@rescalan rescalan linked a pull request Feb 5, 2021 that will close this issue
@jwildfire jwildfire linked a pull request Dec 5, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants