Represents a time unit and offers methods for time unit related functionality. It stores all information related to timepoints (i.e. time and dates) of the estimation and holdout sample periods and offers methods to parse user input and to do 'time-unit math'.

# S4 method for class 'clv.time'
show(object)

Details

This encapsulation of all time unit functionality in one class allows for custom type of time units such as Bi-weekly or irregularly spaced time units.

clv.time is a virtual class and sub-classes implement the actual parsing and calculations.

clv.time.date uses data type Date for time units equal or greater than a single day that do not require a time of day.

clv.time.datetime uses data type POSIXct for time units smaller than a single day.

Slots

timepoint.estimation.start

Single Date or POSIXct that stores the start of the estimation period.

timepoint.estimation.end

Single Date or POSIXct that stores the end of the estimation period.

timepoint.holdout.start

Single Date or POSIXct that stores the start of the holdout period.

timepoint.holdout.end

Single Date or POSIXct that stores the end of the holdout period.

time.format

Single character vector with the format that is used to parse dates and times given as characters.

estimation.period.in.tu

Single numeric indicating the length of the estimation period in number of time units.

holdout.period.in.tu

Single numeric indicating the length of the holdout period in number of time units.

name.time.unit

Single character vector storing the human-readable name of the time unit for output.

See also

summary.clv.time for a summary about an object of class clv.time

clv.time.days for an implementation of time unit 'Days'

clv.time.weeks for an implementation of time unit 'Weeks'

clv.time.years for an implementation of time unit 'Years'