View source: R/plot.disease_expose.R
plot.disease_expose | R Documentation |
disease_expose
ObjectCreate grouped bar charts for each disease-exposure combination on one page
## S3 method for class 'disease_expose' plot(x, ...)
x |
an object of class |
... |
additional arguments to be passed to |
A gtable
object of grouped bar charts on one page
de_data <- disease_expose_data # use the example data in the package cleaned_de_data <- clean_disease_expose(data = de_data, disease = "disease", noDisease = "No", exposures = c("exposure1", "exposure2", "exposure3")) # clean the data using specific columns in the dataset ## Not run: de_object <- disease_expose(cleaned_de_data) # the best way to create a disease_expose object is by using the helper and selecting your choices in the Shiny gadget ## End(Not run) de_object <- new_disease_expose(cleaned_de_data, disease = 1, exposures = 2:8) # another way to create a disease_expose object is to use the constructor and manually enter the information plot(x = de_object) # plot your disease_expose object plot(x = de_object, position = 'dodge') # provide an input to geom_bar using the ... argument to customize the plot a little more
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.