ck_ice_days: Ice Days

View source: R/temperature.R

ck_ice_daysR Documentation

Ice Days

Description

Count the number of days where maximum temperature is below 0 degrees C.

Usage

ck_ice_days(tmax, dates, period = "annual")

Arguments

tmax

Numeric vector of daily maximum temperatures (degrees C).

dates

Date vector of the same length as tmax.

period

Character. Aggregation period: "annual" (default) or "monthly".

Value

A data frame with columns period, value, index, and unit.

Examples

dates <- as.Date("2024-01-01") + 0:9
tmax <- c(-2, 3, -1, 5, -3, 0, 2, -4, 1, -1)
ck_ice_days(tmax, dates)

climatekit documentation built on May 9, 2026, 5:08 p.m.