thresholds {prada} | R Documentation

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

### Description

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

### Usage

    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

### See Also

### Examples

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

[Package prada version 1.10.1 Index]