Skip to contents

Assigns correct units to the output of az_hourly(), az_daily(), and az_heat() using the units package.

Usage

az_add_units(x)

Arguments

x

A tibble output by az_hourly(), az_daily(), or az_heat()

Value

A tibble with columns of class "units"

Examples

if (FALSE) { # \dontrun{
daily <- az_daily()

daily_units <-
  az_add_units(daily)

#unit conversions with `units::set_units()`
daily_units$sol_rad_total %>% units::set_units("kW h m-2")

#units carry through calculations
climatic_balance <-
  daily_units$precip_total_mm - daily_units$eto_pen_mon
climatic_balance
} # }