checkFlatline(var,tolerance,window)
Sets the output to
Error if the variable flatlines. If, in the number of rows indicated
by window, the difference between the variable's maximum and minimum
values is less than tolerance, the variable is considered flatlined.
Specify a tolerance value to account for any insignificant amount
of variation caused by noise in the variable. For example, if the
tolerance is 0 and the window is 20, the variable may have the same
value for 19 rows without generating an error, but if the variable
continues unchanged for 20 rows, the 20th row will be an error.
Provide Feedback