Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

valindex

Valid Indexes


Description

Identify the indexes that are simultaneously valid (not missing) in sim and obs.

Usage

valindex(sim, obs, ...)

## Default S3 method:
valindex(sim, obs, ...)

## S3 method for class 'matrix'
valindex(sim, obs, ...)

Arguments

sim

zoo, xts, numeric, matrix or data.frame with simulated values

obs

zoo, xts, numeric, matrix or data.frame with observed values

...

further arguments passed to or from other methods.

Value

A vector with the indexes that are simultaneously valid (not missing) in obs and sim.

Note

This function is used in the functions of this package for removing missing values from the observed and simulated time series.

Author(s)

Mauricio Zambrano Bigiarini <mauricio.zambrano@ing.unitn.it>

See Also

Examples

sim <- 1:5
obs <- c(1, NA, 3, NA, 5)
valindex(sim, obs)

hydroGOF

Goodness-of-Fit Functions for Comparison of Simulated and Observed Hydrological Time Series

v0.4-0
GPL (>= 2)
Authors
Mauricio Zambrano-Bigiarini [aut, cre, cph] (<https://orcid.org/0000-0002-9536-643X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.