h_nodata: Replace values with NA conditionally or in a time interval

h_nodataR Documentation

Replace values with NA conditionally or in a time interval

Description

Replace values with NA conditionally or in a time interval

Usage

h_nodata(file, threshold = NA, test = "=", start = NA, end = NA)

Arguments

file

File name to proceed

threshold

Threshold value (default = NA)

test

Test "=" (default);"<";"<=";">";">="

start

Start date/time (included) of POSIXct class (default = NA)

end

End date/time (excluded) of POSIXct class (default = NA)

Details

The function replace values with NA conditionally or introduce a gap for a given interval.

For the conditional option, the start parameter must be NA. A conditional test is applied on the values (= ; > ; >= ; < ; <=) with a fixed threshold returning NA if the test is verified.

For the gap option, the threshold parameter must be NA. All the values of the records within the interval start end are replaces by NA.

CAUTION ! At least one of both parameters threshold or start must not be NA. NA.

The output file is named with a na_ prefix.

Author(s)

P. Chevallier - Oct 2017-Jan 2019

Examples

## Not run: 

f <- h_nodata(f, threshold=10., test= "<=", start=NA)

## End(Not run)


htsr documentation built on Oct. 13, 2023, 5:10 p.m.