combine | R Documentation |
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.
combine(dt1, dt2, ...)
dt1 |
first data table |
dt2 |
second data table |
... |
passed on to data.table::merge |
The merged data table
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.