regime_curve: Compute a regime curve

Description Usage Arguments Value

View source: R/utils.R

Description

Compute regime curves from the data provided in 'x'. It first apply smoothing (rolling mean) with a wondow 'n' of the data provided in 'x'. Then, it compute the inter-annual mean of each calendar day (provided in vector 'hdays'). It recommended to ignore the last day using 'remove_last = TRUE'.

Usage

1
regime_curve(hdays, x, n = 1L, na.rm = TRUE, remove_last = TRUE)

Arguments

hdays

numeric vector. vector of 'julian' date of length m which should be computed according to hydrological year (see function get_hydro_years_seasons())

x

numeric vector. a vector (of length m) or a matrix (with m rows)

n

integer. smoothing window

remove_last

logical. should the last day of the year (366) be removed (recommended).

Value

A 366 (remove_last = FALSE) or 365 (remove_last = TRUE) long numeric vector (or matrix with 366 or 365 rows) containing the regime curve(s)


IvanHeriver/hsa-R-package documentation built on Dec. 17, 2021, 11:32 p.m.