date_xx_breaks: Pretty Breaks For date_xx Vectors

date_xx_breaksR Documentation

Pretty Breaks For date_xx Vectors

Description

date_*_breaks does not return breaks, but a function that calculates breaks. This is for compatibility with the breaks functions from scales such as scales::pretty_breaks(), and for ease of use with ggplot2.

Usage

date_yq_breaks(n = 6)

date_ym_breaks(n = 6)

date_yw_breaks(n = 6)

Arguments

n

NULL or integer scalar. The desired maximum number of breaks. The breaks algorithm may choose less breaks if it sees fit.

Value

a function that calculates a maximum of n breaks for a date_xx vector

Examples

x <- date_ym(2016, 1:12)
date_ym_breaks()(x)
date_ym_breaks(12)(x)

dint documentation built on Oct. 17, 2022, 9:06 a.m.