doBarplot | R Documentation |
Generates barplot on variables and shows counts per group.
doBarplot(data, var, xlab = var, ylab = "Frequency", title = NULL, digits = 3)
data |
data.frame with column names |
var |
string of variable in |
xlab |
x-axis label |
ylab |
y-axis label |
title |
barplot title |
digits |
number of digits to round to |
The number of data points in each group is reported. The number of scorable and missing data are also reported by number and percentage in the barplot title.
Barplot of frequencies for each group
Function expects missing to be NA
. Do not filter out missing data
as this function reports missing data frequencies.
Samuel Leung, Derek Chiu
doBarplot(mtcars, "cyl", "title = Number of cylinders")
doBarplot(mtcars, "cyl", "Cylinders", title = "Number of cylinders")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.