dm_join_daily_clim: Join daily climate summaries to daily dendrometer statistics

View source: R/dm_join_daily_clim.R

dm_join_daily_climR Documentation

Join daily climate summaries to daily dendrometer statistics

Description

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.

Usage

dm_join_daily_clim(daily_obj, clim_daily)

Arguments

daily_obj

Output of daily.data() with class "daily_output".

clim_daily

Climate input. This can be a daily climate table, a standardized climate object returned by read.climate(), a raw climate data frame, or a valid climate file path.

Value

The daily.data() output with climate columns appended. The returned object has class c("daily_output_clim", "daily_output", ...).

Examples


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)



dendRoAnalyst documentation built on May 20, 2026, 5:07 p.m.