dtt_month: Get and Set Month Values

Description Usage Arguments Value Methods (by class) Examples

View source: R/month.R

Description

Gets and sets month values for date/time vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
dtt_months(x, ...)

dtt_months(x) <- value

dtt_month(x, ...)

dtt_month(x) <- value

## S3 method for class 'Date'
dtt_month(x, ...)

## S3 method for class 'POSIXct'
dtt_month(x, ...)

## S3 replacement method for class 'Date'
dtt_month(x) <- value

## S3 replacement method for class 'POSIXct'
dtt_month(x) <- value

dtt_set_month(x, value)

Arguments

x

A date/time vector.

...

Unused.

value

A integer vector of the month value(s).

Value

An integer vector (or the modified date/time vector).

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
x <- as.Date("1990-01-02")
dtt_month(x)
dtt_month(x) <- 11L
x

x <- as.POSIXct("1990-01-02 23:40:51")
dtt_month(x)
dtt_month(x) <- 11L
x

dttr2 documentation built on July 10, 2020, 5:06 p.m.