Description Usage Arguments Author(s) Examples
View source: R/create.scatterplot.R
Create a scatterplot given a dataframe using two columns
1 |
filename |
Filename to write plot to (default: return plot object) |
data |
Dataframe |
x |
Item defined for the x-axis |
y |
Item defined for the y-axis |
regression.line |
Add a regression line using the lm function (default: FALSE) |
regression.line.error |
Add the regression line standard error (default: FALSE) |
xlab |
label for the x-axis |
ylab |
label for the y-axis |
resolution |
the resolution of the plot to be passed to write.plot |
Author: Richard de Borja <richard.deborja@sickkids.ca> Maintainer: Richard de Borja <richard.deborja@sickkids.ca>
1 2 3 4 5 6 7 8 | # simple scatterplot
create.scatterplot(data = mtcars, x = 'cyl', y = 'mpg')
# add x and y axis labels
create.scatterplot(data = mtcars, x = 'cyl', y = 'mpg', xlab = 'Number of Cylinders', ylab = 'Miles/Gallon [mpg]')
# add a regression line
create.scatterplot(data = mtcars, x = 'cyl', y = 'mpg', regression.line = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.