Format the dataset to the syntax of REDI functions
format_data.Rd
Format the dataset to the syntax of REDI functions
Usage
format_data(
data,
input = 1,
output = 2,
by = "day",
format = "%Y%m%d",
summary_duplicate = mean
)
Arguments
- data
A tibble or data frame containing one column indicating time and another indicating the quantity for which we want to compute REDI.
- input
A character or a number, indicating whether the name or the index of the input column (time).
- output
A character or a number, indicating whether the name or the index of the output column (workload).
- by
A number or a character string, indicating the reference time period between two observations. Possible values are 'day', 'week', 'month', 'year', or any arbitrary number. See documentation of the 'seq()' for additional information if necessary. Default is 'day'.
- format
A character string, indicating the date format of the input. Please read
lubridate::as_date()
. Default is '%Y%m%d'.- summary_duplicate
A function, used to summarise Output values for duplicated Input values. Default is mean.