WeatherAllocation: Weather Allocation

Description Usage Arguments Details Value Examples

View source: R/WeatherAllocation.R

Description

Calculates average weather (humidity, temperature) values within a measurement period.

Usage

1
WeatherAllocation(weight_loss_data, weather_data)

Arguments

weight_loss_data

data frame containing at least a column named "date.and.time" of the class POSIXct with the time (and date) of the measuring events. A column named "sample" containing the sample IDs is optionally required if several samples were measured.

weather_data

data frame containing at least a column named "date.and.time" of the class POSIXct with the time (and date) of the weather measurements and two columns named "humidity" and "temperature" containing the numerical weather data

Details

Averages within a measurement period are determined by approximate integration and normalization of the weather as a function of time.

Value

The original weight loss data frame extended by the approximatively integrated and normalized weather data for each period between two weight measurements. The first value of each sample is NA since weather values are averaged from row i to i-1.

Examples

1
2
3
4
5
6
# get example data
weight_loss_data <- leaf_drying_data
weather_data <- weather_data

# allocate averaged weather data to weight loss data
weight_loss_data_with_weather <- WeatherAllocation(weight_loss_data, weather_data)

pvldcurve documentation built on Oct. 23, 2020, 8:09 p.m.