col_density: Plots non-parametric density overlays for each column in a...

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate and plot the non-parametric density for the data in each column of a matrix. All densities are plotted on the same graphic.

Usage

1
2
col_density(x, xlim = NULL, xlab = "", main = "", plot.it = TRUE,
  ...)

Arguments

x

a matrix

xlim

vector of length 2 giving min and max for x-axis

xlab

x-axis label

main

main title for graphic

plot.it

logical, should a plot be created

...

additional arguments passed to density

Value

Invisibly returns a list with x and y components for the plotted density curves.

Author(s)

Michael Malick

See Also

density

Examples

1
2
3
4
5
6
 mat <- matrix(rnorm(100000), ncol = 100)
 col_density(mat)
 col_density(mat, main = "test")
 col_density(mat, xlim = c(-4, 3))
 xx <- col_density(mat, xlim = c(-4, 3))
 class(xx)

MichaelMalick/r-codatools documentation built on May 8, 2019, 9:56 a.m.