augment_daily: add daily average value

Description Usage Arguments Examples

Description

add daily average values to an existing dataset

Usage

1
augment_daily(x, col, country_id = "country", decay = 1)

Arguments

x

dataset

col

column name of the measure to be aggregated and lagged

country_id

column name of the country to be used in aggregations

decay

lag as a number of days

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
load_dir <- system.file(package = "antaDraft",
  "data_sample/load_sample_2017")

load_data <- anta_load(data_dir = load_dir )
load_data <- augment_validation(data = load_data)
head(load_data)

aggregated_db <- agg_data(load_data)
aggregated_db <- augment_validation(aggregated_db)
aggregated_db <- data_correct_with_rules(aggregated_db)
aggregated_db <- augment_process_summary(aggregated_db)
aggregated_db <- augment_holiday(aggregated_db)
aggregated_db <- augment_seasons_id(aggregated_db)
aggregated_db <- augment_daylight(aggregated_db)
aggregated_db <- augment_daily(aggregated_db, col = "CTY", decay = 1)
aggregated_db <- augment_daily(aggregated_db, col = "CTY", decay = 2)
head(aggregated_db)

rte-antares-rpackage/antaDraft documentation built on May 14, 2019, 2:59 p.m.