makeplot | R Documentation |
Function to make plot. Currently just wraps around qplot
makeplot(data, subset, x, y, fill, size, facet, fittype, intercept = 0,
slope = 0, fitequation = FALSE)
data |
The dataframe |
subset |
subset the data. See ?subset |
x |
x-variable (as string) |
y |
y-variable (as string) |
fill |
coloring variable (as string) |
size |
size variable (as string) |
facet |
faceting variable (as string) |
... |
passed on to qplot |
makeplot(iris, x='Sepal.Width')
makeplot(iris, x='Sepal.Width', fill='Species')
makeplot(iris, x='Sepal.Width', facet='Species')
makeplot(iris, x='Sepal.Width', subset='Species == "virginica"')
makeplot(iris, x='Sepal.Width', subset='Species == "virginica" & Sepal.Width > 3')
makeplot(iris, x='Species')
makeplot(iris, x='Species', fill='Species')
makeplot(iris, y='Sepal.Width', x='Sepal.Length', fill='Species')
makeplot(iris, x='Species', y='Sepal.Length', fill='Species')
makeplot(iris, x='Sepal.Length', y='Species')
makeplot(CO2, x='Plant', y='Type')
makeplot(CO2, x='Treatment', y='Type')
makeplot(CO2, x='Treatment', y='Plant', facet='Type', fill='Plant')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.