ch_tr_sign {CSHShydRology} | R Documentation |
ch_tr_sign
Description
Converts MK (or other) slopes to integers 1-2-3 (negative, none, positive). These indices can be used to indicate trend direction.
Usage
ch_tr_sign(x, offset = 2)
Arguments
x |
an array of slopes |
offset |
the amount of shift to make values positive integers, default is 2. |
Value
Returns an array of indices (1, 2, 3)
Author(s)
Paul Whitfield
Examples
mkin <- c( -0.23, 0.34, 0.0, .033, -0.55)
mkout <- ch_tr_sign(mkin)
# 1 3 2 3 1
[Package CSHShydRology version 1.4.2 Index]