general.scatter.simple: Function to generate a simple scatter plot

Description Usage Arguments Value Author(s)

Description

Function to generate a simple scatter plot

Usage

1
2
3
general.scatter.simple(data, by = NULL, fun = "mean", smooth.fun = "auto",
  smooth.formula = y ~ x, density = FALSE, title = NULL, xlab = NULL,
  ylab = NULL, legend.pos = "none")

Arguments

data

A dataframe with at least three columns (x,y and a facetting variable) (Required)

by

Grouping variable (Default: NULL)

fun

Function for statistical aggregation function (Default: "mean")

smooth.fun

Smoothing method (function) to use, eg. "lm", "glm", "gam", "loess", "rlm". (Default: "auto") For method = "auto" the smoothing method is chosen based on the size of the largest group (across all panels). loess is used for less than 1,000 observations; otherwise gam is used with formula = y ~ s(x, bs = "cs"). Somewhat anecdotally, loess gives a better appearance, but is O(n^2) in memory, so does not work for larger datasets.

smooth.formula

Formula to use in smoothing function, eg. y ~ x, y ~ poly(x, 2), y ~ log(x) (Default: y ~ x)

density

Display density contour (Default: FALSE)

title

Plot Title (Default: NULL)

xlab

x-axis label (Default: NULL)

ylab

y-axis label (Default: NULL)

legend.pos

(Default: "none")

Value

ggplot2 figure

Author(s)

Jens Hooge


jhooge/BioViz documentation built on May 19, 2019, 9:28 a.m.