Contrast: Matrix contrast

View source: R/tools.R

ContrastR Documentation

Matrix contrast

Description

Computes matrix contrast, defined as the number of unique truncated entries with a specified number of digits.

Usage

Contrast(mat, digits = 3)

Arguments

mat

input matrix.

digits

number of digits to use.

Value

A single number, the contrast of the input matrix.

References

\insertRef

ourstabilityselectionfake

Examples

# Example 1
mat <- matrix(c(0.1, 0.2, 0.2, 0.2), ncol = 2, byrow = TRUE)
Contrast(mat)

# Example 2
mat <- matrix(c(0.1, 0.2, 0.2, 0.3), ncol = 2, byrow = TRUE)
Contrast(mat)


fake documentation built on April 14, 2023, 12:37 a.m.