
Scan Candidate Weather Windows Relative to a Reference Time
scan_windows.RdFor each candidate window, subsets the weather series relative to a reference time and computes summary features. The reference can be an assessment date, planting date, flowering date, inoculation date, or any other biologically meaningful timestamp.
Usage
scan_windows(
weather,
reference_time,
windows,
weather_cols = NULL,
time_col = "time",
temp_col = "temp",
rh_col = "rh",
rain_col = "rain",
leaf_wetness_col = "leaf_wetness",
unit = c("days", "hours"),
statistics = list(
temp = c("mean", "min", "max"),
rh = "mean",
rain = "sum",
leaf_wetness = "sum"
)
)Arguments
- weather
A weather data frame.
- reference_time
Reference time used to place the candidate windows.
- windows
A data frame created by
make_windows.- weather_cols
Character vector of weather columns to summarize. If named, the names are used in the output feature names.
- time_col
Name of the weather timestamp column.
- temp_col
Name of the temperature column.
- rh_col
Name of the relative humidity column.
- rain_col
Name of the rainfall column.
- leaf_wetness_col
Name of the leaf wetness column.
- unit
Time unit for relative-time windows. One of
"days"or"hours".- statistics
Summary statistics passed to
summarise_weather_window().