hyet_remove_rep: Replace repeated, non-zero, precipitation values with NA

Description Usage Arguments Value Examples

View source: R/hyet_remove_rep.R

Description

hyet_remove_rep sets to NA repeated values precipitation values in a hyetograph. Returns an error if hyet is not a valid hyetograph.

Usage

1

Arguments

hyet

a hyetograph from hyet_create function

Value

a tibble with the variables date and prec

Examples

1
2
3
4
5
6
7
8
9
# create a hyetograph
date <- seq(from = as.POSIXct(0, origin = "2018-01-01"),
                  length.out =  11,
                  by = "30 mins")
prec <- c(0.001, 0.2, 0.5, 0.21, 0.21, 0.21, 0.21, 0.21, 0.0005, 0, 0)
hyet <- hyet_create(date, prec)

# remove repeated values
hyet_remove_rep(hyet)

kvantas/erosivity documentation built on July 25, 2018, 9:32 p.m.