iso-year-week-day-widen: Widen: iso-year-week-day

Description Usage Arguments Value Examples

Description

This is a iso-year-week-day method for the calendar_widen() generic. It widens a iso-year-week-day vector to the specified precision.

Usage

1
2
## S3 method for class 'clock_iso_year_week_day'
calendar_widen(x, precision)

Arguments

x

[clock_iso_year_week_day]

A iso-year-week-day vector.

precision

[character(1)]

One of:

  • "year"

  • "week"

  • "day"

  • "hour"

  • "minute"

  • "second"

  • "millisecond"

  • "microsecond"

  • "nanosecond"

Value

x widened to the supplied precision.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Week precision
x <- iso_year_week_day(2019, 1)
x

# Widen to day precision
# In the ISO calendar, the first day of the week is a Monday
calendar_widen(x, "day")

# Or second precision
sec <- calendar_widen(x, "second")
sec

clock documentation built on April 23, 2021, 1:06 a.m.