Wrapper function that converts the dataset to the adequate format, compute
values of REDI for each Input values, display a generic plot of the results
and return a tibble containing both data and corresponding REDI values.
redi(
data,
coef = c(0.05, 0.1, 0.5),
input = 1,
output = 2,
plot = TRUE,
by = "day",
format = "%Y%m%d",
summary_duplicate = mean
)A tibble containing 4 columns : Input (without duplicates),
Output, Lambda and REDI, which corresponds to the vector
returned by the loop_REDI() function.
A tibble or a data frame, containing an Input column that is
used as reference for the observations (e.g. time for
longitudinal data), and an Output column specifying the observed
values of interest (the workload).
A number or vector, containing the values of the lambda coefficient used in the REDI computations, controlling the decay of the exponential weights. Default is c(0.05, 0.1, 0.5).
A character or a number, indicating the name or the
index of the Input column (time).
A character or a number, indicating the name or the
index of the Output column (workload).
A boolean, indicating whether results should be displayed. is TRUE.
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'.
A character string, indicating the date format of the input.
Please read lubridate::as_date(). Default is '%Y%m%d'.
A function, used to summarise Output values for duplicated Input values. Default is mean.
data <- simu_db()
redi <- redi(data)
Run the code above in your browser using DataLab