Description Usage Arguments Value
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:
is the year complete (i.e. is there at least n
(e.g. 365) days)?
is there less than na.th
(proportion) missing values in the
hydrological year?
1 | get_valid_hydro_year(hy, x = NULL, n = 365, na.th = 0.05)
|
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 |
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.