Skip to contents

Checks that a weather table contains the expected columns, converts the time column to POSIXct, sorts observations by time, and removes duplicated timestamps.

Usage

validate_weather_data(
  weather,
  time_col = "time",
  required_cols = c("temp", "rh", "rain", "leaf_wetness")
)

Arguments

weather

A data frame with weather observations.

time_col

Name of the timestamp column.

required_cols

Character vector of required weather columns.

Value

A cleaned data frame sorted by time.