weighted_temperature_sum: Create a weighted temperature sum

weighted_temperature_sumR Documentation

Create a weighted temperature sum

Description

A temperature sum is constructed by summing the average daily temperature for each day, but applying a weight factor of 0.5 for January and 0.75 for February.

Usage

weighted_temperature_sum(temperatures, negative = FALSE)

Arguments

temperatures

vector Daily average temperatures in degree Celsius.

negative

boolean Whether to include negative temperature values in the summation. By default, negative values are set to 0, meaning that the temperature sum is monotonically increasing.

Value

Weighted temperature sum.

Examples

# Use fake temperatures
ts = rep(2, 365)
weighted_temperature_sum(ts)


growR documentation built on May 29, 2024, 9:12 a.m.