densityCal: Internal density calculation function serves for...

Description Usage Arguments Value Examples

Description

Internal density calculation function serves for stackDenistyPlot

Usage

1
2
3
densityCal(data, kernel = c("gaussian", "epanechnikov", "rectangular",
  "triangular", "biweight", "cosine", "optcosine"), bw = "nrd0", adjust = 1,
  reomoveOutliers = FALSE)

Arguments

data

Input data frame including variable columns and stackFactor column.

kernel

Kernel applied for density calculation, includes "gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine", "optcosine".

bw

The smoothing bandwidth to be used. The default, "nrd0", has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., "SJ" would rather fit.

adjust

The bandwidth used is actually adjust*bw.

reomoveOutliers

If coerce the outliers to 1.5*IQR level.

Value

data frame containing stackName, x, y and densityName

Examples

1
2
3
4
data <- iris
data$stackFactor <- data$Species
data$Species <- NULL
dr <- densityCal(data = data)

haoeric/StackedDensityPlot documentation built on May 17, 2019, 2:29 p.m.