thresholds: Discretize a two-dimensional data space into quadrants by...

Description Usage Arguments Details Value Author(s) Examples

View source: R/thresholds.R

Description

Discretize a two-dimensional data space into quadrants by applying thresholds.

Usage

1
thresholds(x, y, xthr, ythr)

Arguments

x

Vector containing x or matrix containing x and y values of bivariate data.

y

Optional vector containing y values of bivariate data.

xthr

x value seperating 'left' and 'right'.

ythr

y value seperating ‘up' and ’down'.

Details

The function returns a 2x2 matrix giving the counts for each quadrant. Events with values equal to the thresholds are counted to the left or down respectively.

Value

2x2 matrix.

Author(s)

Florian Hahne

Examples

1
thresholds(cbind(c(1, 1, 2, 2, 2, 4), c(1, 4, 2, 4, 5, 4)), xthr=3, ythr=3)

prada documentation built on April 28, 2020, 7:52 p.m.