View source: R/ACutils_export.R
mybarplot2 | R Documentation |
Useful function to produce barplot within for loops.
mybarplot2(mydata, myexposure = NULL, myoutcome)
mydata |
tibble the dataset |
myexposure |
string the name of the categorical variable that defines the different levels. If it is not NULL, different bar levels are produced. |
myoutcome |
string the name of the categorical variable whose counts must the shown in a barplot. |
One bar for each level of level of the outcome variable. If there is exposure, an additional bar for each level of the exposure is produced.
mybarplot2(mydata = data2, myexposure = "treatment", myoutcome = "race")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.