flaggt

Flags data values greater than a specified threshold

var flagval flaggt

Arguments
labeltypedescription
var variable variable on which flags are to be applied
flagval variable or constant threshold value used to apply flags
Returns
flaggedvar variable binary version of var, where values greater and less than flagval are assigned values of 1 and 0, respectively

Description

flaggt replaces values of the input variable "var" with a value of "1" if the input values are greater than the user-specified threshold value "flagval" and replaces values of the input variable "var" with a value of "0" if the input values are less than or equal to the user-specified threshold value "flagval".

Example

In the following example flaggt is used to mark those months in which stations in the ANEEL daily precipitation data set have no more than one day of precipitation data missing per month. The "dataflag" command is first applied to the daily precipitation data to flag with a "1" those days with non-missing precipitation data, and to flag with a "0" those days with missing data. "monthlyAverage" is applied to these daily flags of "1"s and "0"s to calculate the fraction of days per month with non-missing data, assigning one value per month. "0.96 flaggt" is applied to these monthly fractional values and replaces them with a value of "1" if at least 96% of days in the month (which is at least all but one day per month, no matter which month) have non-missing precipitation values and a value of "0" if more than one day per month has missing precipitation.

SOURCES .ANEEL .prcp_sta .prcp
dataflag
monthlyAverage
0.96 flaggt


Live Example Link


See also

Binary Data Flags: flagge flagle flaglt
Comparing Data: flagge flagle flaglt maskge maskgt maskle masklt max min
Masks: flagge flagle flaglt maskge maskgt maskle masklt masknotrange maskrange