simplePlot | R Documentation |
Generate plots for a continuous/quantitative univariate variable using the ggplot2 package
simplePlot( data, xcol, fill = "white", color = "black", bins = 5, H = TRUE, D = TRUE, B = TRUE, P = TRUE )
data |
The data frame that the variable is in |
xcol |
The variable of interest, entered as a string |
fill |
The fill color of the plots, entered as a string |
color |
The outline color of the plots, entered as a string |
bins |
The number of bins for the plots, entered as a numeric value |
H |
Boolean operator to create histogram, default is FALSE |
D |
Boolean operator to create density plot, default is FALSE |
B |
Boolean operator to create boxplot, default is FALSE |
P |
Boolean operator to create freqpoly plot, default is FALSE |
The requested plots in ggplot2 format
simplePlot(mtcars, "wt") simplePlot(mtcars, "wt", H = FALSE, B = FALSE, P = FALSE, color = "purple", fill = "pink")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.