custom_period {timeperiodsR}R Documentation

Custopm period

Description

Create tpr object between start and end dates

Usage

custom_period( start, 
               end,
               part = getOption("timeperiodsR.parts")) 

Arguments

start

Start date in YYYY-MM-DD format

end

End date in YYYY-MM-DD format

part

Part of period you need to receive, one of "all", "start", "end","sequence", "length", "workdays", "weekends", "first_workday", "last_workday", "first_weekend", "last_weekend", "length". See details.

Details

You can get object of tpr class with all components or specify which component you need, use part for manage this option:

Value

Object of tpr class

Author(s)

Alexey Seleznev

Examples

## To create tpr object between two dates
customper <- custom_period(start = "2019-09-01",
                           end   = "2019-09-05")

## To get vector of date sequences 
seq(customper)

## Get number of days of previous months
length(customper)

## To get start of end dates
start(customper)
end(customper)

[Package timeperiodsR version 0.7.3 Index]