get_ternary_class_id: Get ternary class id

View source: R/operations.R

get_ternary_class_idR Documentation

Get ternary class id

Description

Helper function that checks if a value surpasses the given threshold either positively, negatively or not at all and returns a value indicating in which class (i.e. interval) it belongs.

Usage

get_ternary_class_id(value, threshold)

Arguments

value

numeric

threshold

numeric

Value

an integer. There are 3 cases:

  • 1: when value > threshold

  • -1: when value < -threshold

  • 0: otherwise


usefun documentation built on Sept. 15, 2024, 1:06 a.m.