compare_distributions: Compare Distributions

Description Usage Arguments Value Examples

View source: R/plot.R

Description

compare_distributions Compare an empirical data distribution to fitted distributions using pdf, cdf, qq, and pp plots.

Usage

1
2
compare_distributions(data, limits = NULL, quantity = "Data",
  title = NULL)

Arguments

data

data.frame or matrix; The first column is the empirical data, the others being the data from the theoretical distribution e.g. gene means or library sizes

quantity

string; Name of thing being compared - used in the axis labels

limits;

passed to scale_x_log10 "A numeric vector of length two providing limits of the scale.". Defaults to empirical range of the data.

Value

A ggplot2 object of pdf, cdf, qq, and pp plots.

Examples

1
2
3
4
fake_data <- data.frame(data1 = rlnorm(n = 500, meanlog = 0, sdlog = 1), # would usually empirical data
                        data2 = rlnorm(n = 500, meanlog = 0, sdlog = 1.5),
                        data3 = rlnorm(n = 500, meanlog = 0.5, sdlog = 1))
compare_distributions(fake_data)

marchinilab/sinsynthr documentation built on May 29, 2019, 3:44 a.m.