create.scatterplot: Create a scatterplot

Description Usage Arguments Author(s) Examples

View source: R/create.scatterplot.R

Description

Create a scatterplot given a dataframe using two columns

Usage

1
create.scatterplot(filename = NULL, data, x, y, regression.line = FALSE, regression.line.error = FALSE, xlab = NULL, ylab = NULL, resolution = NULL)

Arguments

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(s)

Author: Richard de Borja <richard.deborja@sickkids.ca> Maintainer: Richard de Borja <richard.deborja@sickkids.ca>

Examples

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)

rdeborja/plotting.general documentation built on May 27, 2019, 3:05 a.m.