freq_bar | R Documentation |
This function is to examine normality and linearity of a linear regression in the form of histograms of your predictor and your outcome as well as a scatterplot of these variables.
freq_bar(data, x, fill, total)
data |
The data frame that includes the factor variable you are interested in getting proportions, percentages, and a visual of groups in the variable. |
x |
The X variable you'd like to examine. |
fill |
Value to determine the color you'd like your bar graph to be filled with. The outline of the histograms is set to "White" |
total |
Numerical value of your total sample in your study. |
Returns a list with a visual of the groups and a table of the proportions and percentages
To examine the visual freq_bar(mtcars, as.factor(cyl), fill = "dodgerblue", total = 32)[[1]] To create a table freq_bar(mtcars, as.factor(cyl), fill = "dodgerblue", total = 32)[[2]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.