get_valid_hydro_year: Compute the valid hydrological year

Description Usage Arguments Value

View source: R/utils.R

Description

Given a hydrological year vector (a vector indicating the hydrological year each time step belongs to) and a matrix with the same number of rows (and any number of column), this function returns a logical vector of the same length as the hydrological year vector that indicates which are the time steps that are part of a valid hydrological year. Validity of a hydrological year is assessed according to the following rules:

Usage

1
get_valid_hydro_year(hy, x = NULL, n = 365, na.th = 0.05)

Arguments

hy

numeric vector. a hydrological year vector (will be coerced to factor)

x

numeric matrix. a matrix (or a vector) with as many row (elements) as the length of hy used to look for missing values

n

integer. the minimum length of a complete hydrological year this is also use to compute the proportion of missing values.

na.th

numeric. the minimal tolerated proportion of missing values

Value

a logicalvector of the same length as the hydrological year vector that indicates whether or not the time steps are part of a valid hydrological year.


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