weighted_temperature_sum {growR} | R 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)
[Package growR version 1.3.0 Index]