degree2logical: Transforms a matrix of membership degrees into a logical...

View source: R/interval.R

degree2logicalR Documentation

Transforms a matrix of membership degrees into a logical matrix based on a specified threshold.

Description

Transforms a matrix of membership degrees into a logical matrix based on a specified threshold.

Usage

degree2logical(x, t = min(apply(x, 1, max)))

Arguments

x

A matrix of membership degrees.

t

Threshold value for converting the degrees to logical values. By default, it uses the minimum of the maximum values in each row.

Value

A logical matrix where each element is 'TRUE' if it meets or exceeds the threshold, and 'FALSE' otherwise.

Examples

degrees <- matrix(runif(9), nrow = 3)
degree2logical(degrees, t = 0.5)

COveR documentation built on Oct. 30, 2024, 9:28 a.m.