thresholds {prada} | R Documentation |
Discretize a two-dimensional data space into quadrants by applying thresholds.
thresholds(x, y, xthr, ythr)
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'. |
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.
2x2 matrix.
Florian Hahne
thresholds(cbind(c(1, 1, 2, 2, 2, 4), c(1, 4, 2, 4, 5, 4)), xthr=3, ythr=3)