checkm: Bring modelled and measured values together based on...

View source: R/checkm.R

checkmR Documentation

Bring modelled and measured values together based on timestamp

Description

Trivial function that is a simple wrapper for frequent task: Bringing together the measured and modelled values, for instance to do a posteriori analyses of model performance.

Usage

checkm(modelled, measured, t.unit = NULL)

Arguments

modelled

A data.frame with the modelled fluxes and all additional data reported. For instance resulting from doing budget.reco on a "breco" object. One variable has to be the timestamp and it should be named exactly like this.

measured

A data.frame with the originally measured fluxes and additional data. One variable has to be the timestamp and it should be named exactly like this.

t.unit

If NULL, data in modelled and measured are merged based on their timestamp by calculating the minimum difference in time between all entries (see Details). If !NULL, character string specifying to which time interval the timestamps in measured should be rounded using round.POSIXlt. May be one of "mins", "5mins", "10mins", "15mins", "quarter hours", "30mins", "half hours", "hours". Alternatively, a numeric specifying the minutes to round to. To go to seconds just use values < 1, to go beyond the hour just use values > 60.

Details

Case 1 (t.unit = NULL) Data are merged by calculating the difference in time between all timestamps in modelled and all timestamps in measured and identifying the minimum difference to each measured flux. If minimum difference between measured and modelled flux > 1h, no modelled flux is assigned. This approach is a bit slower but it is not necessary to give a correct t.unit, which makes it less error prone.

Case 2 (t.unit != NULL) After rounding the timestamps in measured according to t.unit and transforming both timestamnps to character vectors modelled and measured are merged based on these timestamps and only data rows that are present in both are retained. Therefore t.unit has to be specified according to the interval of the timestamps in modelled.

Value

Data.frame containing the corresponding rows of modelled and measured

Author(s)

Gerald Jurasinski, gerald.jurasinski@uni-rostock.de

Examples

## See examples at reco.bulk

flux documentation built on June 26, 2022, 9:05 a.m.