get_ternary_class_id {usefun} | R 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
[Package usefun version 0.5.0 Index]