dichot: Dichotomize Data with a Cutoff Value

dichotR Documentation

Dichotomize Data with a Cutoff Value

Description

Function to dichotomize the input data for the semigroup construction with a cutoff value.

Usage

dichot(x, c = 1, diag)

Arguments

x

An array, matrix or other data in a numeric form.

c

A cutoff value to perform the dichotomization in x.

diag

(optional and logical, default TRUE) Should diagonals be included in output?

Details

This is a wrapper of the replace base function where in this case is aimed to specify a cutoff value for the dichotomization of the data. Values equal or higher to the cutoff are hence converted to 1, while the others are set to 0. Notice that the cutoff value in c can be any real number, and labels are preserved after the dichotomization..

Value

Binary values of the input data with the same format as x.

See Also

replace, mnplx, semigroup.

Examples

# create two binary relations among three elements
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
       c(3,3,2))>.5, 3 ) )

# dichotomize it with a cutoff value of two
dichot(arr, c = 2)

multiplex documentation built on July 30, 2026, 5:13 p.m.