convert_bookingData_fromNonCumulative_toCumulative.2: Process booking data on a flight level

Description Usage Arguments

View source: R/convert_bookingData_fromNonCumulative_toCumulative.2.R

Description

This function processes the booking data on flight level defined as unique combination of flight id and departure date. If some weeks-2-departure are missing than they are introduced (whole row) and cumulative bookings are calculated per flight.

Usage

1
2
3
4
5
6
convert_bookingData_fromNonCumulative_toCumulative.2(
  df,
  choose_minAnDmax_w2d_forMe = T,
  min_W2D = 0,
  max_w2D = 60
)

Arguments

df

A data frame of booking data with the following columns in the following left-to-right order: flight id, departure date, weeks-2-departure, non-cumulative bookings on the given departure, revenue per person.

choose_minAnDmax_w2d_forMe

A boolean indicating whether to let the algorithm choose the range of weeks-2-departure from the data.

min_W2D

A numeric of minimum weeks-to-departure. Defults to 0. Relevant only if choose_minAnDmax_w2d_forMe is set to FALSE.

max_w2D

A numeric of maximum weeks-to-departure. Defults to 60. Relevant only if choose_minAnDmax_w2d_forMe is set to FALSE.


msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.