Description Usage Arguments Value Author(s) Examples
View source: R/create.densityplot.R
A wrapper function for creating density plots using ggplot.
1 |
data |
data frame containing data to plot |
x |
[Str] data frame column name to use in histogram, must be passed as a string |
xlab |
[Str] label for the x-axis |
ylab |
[Str] label for the y-axis |
group |
Dataframe element to use to group bars using facet_grid() |
group.col |
Boolean to group data for facet_grid() by column |
group.row |
Boolean to group data for facet_grid() by row |
filename |
[Str] filename to save plot to, if none is provided, plot goes to STDOUT |
resolution |
[Int] the resolution of the plot to be passed to write.plot |
width |
Num] plot width |
height |
[Num] plot height |
theme |
[Function] a ggplot2 theme function |
Returns a ggplot plot object.
Richard de Borja <richard.deborja@sickkids.ca>
1 | create.densityplot(data=mtcars, x='mpg', xlab='Miles Per Gallon', y='Density')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.