Creates a dataframe (tibble) with rows for each date (ymd object from library lubridate) from 'yrstart' to 'yrend'. Intervals of dates is specified by argument 'freq'.

init_dates_dataframe(
  yrstart,
  yrend,
  startmoy = 1,
  startdoy = 1,
  timescale = "d",
  endmoy = 12,
  enddom = 31,
  noleap = FALSE
)

Arguments

yrstart

An integer defining the start year of dates covered by the dataframe

yrend

An integer defining the end year of dates covered by the dataframe

startmoy

An integer defining the start month of dates covered by the dataframe. Defaults to 1.

startdoy

An integer defining the start day-of-year of dates covered by the dataframe. Defaults to 1.

timescale

A character string specifying the time steps of dates (in rows). Defaults to "d". Any of "y", "m", "d", "h", "hh".

endmoy

An integer defining the end month of dates covered by the dataframe. Defaults to 12.

enddom

An integer defining the end day-of-year of dates covered by the dataframe. Defaults to 31.

noleap

Whether leap years are ignored. Defaults to FALSE.

Value

A data frame (tibble) with dates.

Examples

if (FALSE) { # \dontrun{
  ddf <- init_dates_dataframe(
  2000,
  2003,
  startmoy=1,
  startdoy=1,
  timescale="d",
  endmoy=12,
  enddom=31,
  noleap=FALSE
  )
} # }