axis_week: Axis for yearweek data

View source: R/graph.r

axis_weekR Documentation

Axis for yearweek data

Description

Create an axis from weekly data (when the plot use week index, and you want to label axe with classical week nubmers)

Usage

axis_week(
  side,
  ww,
  mode = c("ticks", "year", "week", "weeks", "%%"),
  format = "yw",
  col.yw = "yw",
  sep = "s",
  century = T,
  ticks = NULL,
  ...
)

Arguments

side

side of the axeis

ww

data.frame(), with cols wid=week index, [col.yw]=yearweek value (@see make_week_index)

mode

"ticks" follow ticks, "year" each 1st week of each year, "week" (or weeks) some given weeks, "%%" root of modulo

format

"yw" pretty week format, "w"=only week number, NULL=disable

col.yw

name of the yearweek value colum in ww

sep

separator between year and week number

century

use century for year number

ticks

if mode=weeks vector of week (1-53) number, if mode="%%" modulo to use

...

extra parameters passed to axis


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.