View source: R/summary.disease_expose.R
Summarize disease-exposure data by finding various statistics (incidence, risk ratio, odds ratio, Fisher p-value, Chi-square p-value) for each disease-exposure combination in the
## S3 method for class 'disease_expose' summary(object, ...)
an object of class
additional arguments, besides
data.frame object containing statistics for each disease-exposure combination
Special thanks to Josh Sadowski for providing ideas of statistics to use for this function and for providing the bones of this function, which I have added to and edited to make it my own.
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 summary(object = de_object) # create a summary of your disease_expose object summary(object = de_object, idcol = TRUE) # provide an input (idcol) to rbindlist to customize the summary a little more
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.