View source: R/dm_join_daily_clim.R
| dm_join_daily_clim | R Documentation |
Joins daily climate summaries to the output of daily.data() by
calendar date.
The climate input can be:
the output of dm_daily_clim()
the output of read.climate()
a raw climate data frame
a valid climate file path readable by read.climate()
If the supplied climate input is not already a daily climate table, it will
first be converted to daily summaries with dm_daily_clim() using
default daily means for numeric variables.
dm_join_daily_clim(daily_obj, clim_daily)
daily_obj |
Output of |
clim_daily |
Climate input. This can be a daily climate table, a
standardized climate object returned by |
The daily.data() output with climate columns appended. The returned
object has class c("daily_output_clim", "daily_output", ...).
data(nepa17)
data(ktm_clim_hourly)
dd <- daily.data(df = nepa17[1:1000, ], TreeNum = 1)
clim_std <- read.climate(
ktm_clim_hourly,
time_col = "TIME",
vars = c("temp", "prec", "VPD", "RH"),
verbose = FALSE
)
clim_day <- dm_daily_clim(
clim_std,
mean_vars = c("temp", "VPD", "RH"),
max_vars = c("temp", "VPD"),
sum_vars = c("prec")
)
dd_clim <- dm_join_daily_clim(dd, clim_day)
head(dd_clim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.