Description Usage Arguments Author(s) See Also Examples
View source: R/ggViolin.plot.R
Create violin plot of data with interior bars representing median and 50
1 2 | ggViolin.plot(data, x, y, facet = NULL, fill.col = NULL,
facet.cols = NULL, scales = "fixed", CI = .5)
|
data |
a dataframe |
x |
a character vector containing the name of the column in |
y |
a character vector containing the name of the column in |
facet |
character vector containing name(s) of one or two additional factors in |
fill.col |
a character vector specifying the color of the boxes. Default is gray. |
facet.cols |
numeric. Number of columns in display of faceted plots. |
scales |
character vector specifying whether scales should be fixed across facets. Values are "fixed", or "free". |
CI |
numeric. Confidence interval to be plotted as bars inside violin plots. Must be value between 0 and 1. |
... |
additional options. |
Jason Grafmiller
ggplot2, geom_violin, stat_summary
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(brown_genitives)
## plot the distribution of type-token ratios by genre
ggViolin.plot(brown_genitives, "Genre", "TypeTokenRatio")
## plot the distribution of type-token ratios by
## genre and construction type
ggViolin.plot(brown_genitives, "Genre", "TypeTokenRatio",
facet = "Type")
## plot the distribution of type-token ratios by
## genre, possessor animacy and construction type
ggViolin.plot(brown_genitives, "Genre", "TypeTokenRatio",
facet = c("PossrAnimacyBin", "Type")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.