dtt_day {dttr2}R Documentation

Get and Set Day Values

Description

Gets and sets day values for date/time vectors.

Usage

dtt_day(x, ...)

dtt_day(x) <- value

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

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

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

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

dtt_days(x, ...)

dtt_days(x) <- value

dtt_set_day(x, value)

Arguments

x

A date/time vector.

...

Unused.

value

A integer vector of the day value(s).

Value

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

Methods (by class)

Functions

See Also

dtt_day_decimal()

Other set date: dtt_months(), dtt_years()

Examples

x <- as.Date("1990-01-02")
dtt_day(x)
dtt_day(x) <- 27L
x

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

[Package dttr2 version 0.5.0 Index]