Skip to contents

This function creates a custom labeller for use in ggplot2::facet_wrap() to format dates (typically yearmonth) in a specified string format.

Usage

label_yearmonth(formatstring = "%b")

Arguments

formatstring

A character string specifying the format to be used

  • "%b" is "Jan", "Feb"

  • "%b %Y" is "Jan 2024", "Feb 2024"

Value

A labeller function suitable for the labeller argument in gg_facet_wrap_months()