combine {SeaVal} | R Documentation |
Combine two data tables
Description
Function for combining two data tables, e.g. with predictions and observations.
This is a user-friendly wrapper for merge
. It guesses the columns to merge by (the dimension variables
contained in both data tables) and adds some warnings when merges are attempted that are likely not correctly specified by the user.
Usage
combine(dt1, dt2, ...)
Arguments
dt1 |
first data table |
dt2 |
second data table |
... |
passed on to data.table::merge |
Value
The merged data table
Examples
# merge ECMWF-forecasts and CHIRPS observations:
dt = ecmwf_monthly[month == 11]
setnames(dt,'prec','forecast') # forecasts and observations both have a column 'prec'
dt_new = combine(dt,chirps_monthly)
[Package SeaVal version 1.2.0 Index]