year-week-day-narrow: Narrow: year-week-day

year-week-day-narrowR Documentation

Narrow: year-week-day

Description

This is a year-week-day method for the calendar_narrow() generic. It narrows a year-week-day vector to the specified precision.

Usage

## S3 method for class 'clock_year_week_day'
calendar_narrow(x, precision)

Arguments

x

⁠[clock_year_week_day]⁠

A year-week-day vector.

precision

⁠[character(1)]⁠

One of:

  • "year"

  • "week"

  • "day"

  • "hour"

  • "minute"

  • "second"

  • "millisecond"

  • "microsecond"

  • "nanosecond"

Value

x narrowed to the supplied precision.

Examples

# Day precision
x <- year_week_day(2019, 1, 5)
x

# Narrowed to week precision
calendar_narrow(x, "week")

clock documentation built on Sept. 11, 2024, 8:39 p.m.