Learn R Programming

tsibble (version 0.5.3)

time_unit: Extract time unit from a vector

Description

Extract time unit from a vector

Usage

time_unit(x)

Arguments

x

A vector of POSIXt, Date, yearmonth, yearquarter, difftime, hms, integer, numeric.

Examples

Run this code
# NOT RUN {
x <- yearmonth(seq(2016, 2018, by = 0.5))
time_unit(x)
# }

Run the code above in your browser using DataLab