dContours: Create density contours for two-dimensional data.

Description Usage Arguments Value See Also Examples

View source: R/dContours.R

Description

Here, contour lines for two-dimensional data are construced. It is primarily thought to be used in the context of SNE plots in this package. This function is used both internally in other functions suchas sneFluoroPlot and sneDensityPlot, but also as a standalone function, as it increases speed greatly to generate the density curves only once per overall analysis.

Usage

1
dContours(xYData, control, n = 100)

Arguments

xYData

A dataframe with two columns containing position information for each observation in the dataset. Typically, this is the raw result from the SNE analysis.

control

A numeric/integer vector or dataframe of values that could be used to define the range in the internal dScale. If no control data is present, the function defaults to using the indata as control data.

n

The number fo grid points. Default is 100.

Value

A list of three components

x, y

The x and y coordinates of the grid points, vectors of length n.

z

An n[1] by n[2] matrix of the estimated density: rows correspond to the value of x, columns to the value of y.

See Also

dColorPlot, dDensityPlot, dResidualPlot, dWilcox

Examples

1
2
3
4
5
6
# Load the test SNE data
data(testDataSNE)


# Run the function
contour_result <- dContours(testDataSNE$Y)

DepecheR documentation built on Nov. 8, 2020, 5:44 p.m.