next_year {timeperiodsR}R Documentation

Start and end of next year

Description

Defines first and last date in n next year

Usage

next_year(x = Sys.Date(),
             n = 1, 
             part = getOption("timeperiodsR.parts"))

Arguments

x

Date object

n

Number of periods for offset

part

Part of period you need to receive, one of "all", "start", "end","sequence", "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

See Also

For get next other periods see next_month(), next_quarter(), next_week()

Examples

## To get start, end and sequence of next year
nextyear <- next_year()

## To get vector of date sequences 
next_year(part = "sequence")
next_year()$sequence
seq(nextyear)

## Get number of days of next year
day_nums <- next_year(part = "length")
next_year()$length
length(nextyear)

[Package timeperiodsR version 0.7.3 Index]