create_step_duration_max: Create Step Duration At Large Max

create_step_duration_maxR Documentation

Create Step Duration At Large Max

Description

Create Step Duration At Large Max

Usage

create_step_duration_max(
  date_released,
  date_recovered,
  date_released_start,
  date_recovered_end,
  step_interval,
  step_duration_max
)

Arguments

date_released

character() vector() dates as "%Y-%m-%d"

date_recovered

character() vector() dates as "%Y-%m-%d"

date_released_start

character() date as "%Y-%m-%d"

date_recovered_end

character() date as "%Y-%m-%d"

step_interval

character() one of "year", "quarter" or "month"

step_duration_max

integer() maximum steps duration at large

Value

integer() vector()

Examples


# Yearly
u <- rep("2011-01-01", 5)
v <- c("2011-01-01", "2012-01-01", NA, "2020-01-01", "2021-01-01")
w <- c("2011-01-01")
x <- c("2020-01-01")
y  <- "year"
z <- 10
create_step_duration_max(u, v, w, x, y, z)

# Quarterly
u <- rep("2011-01-01", 5)
v <- c("2011-01-01", "2012-12-31", NA, "2020-12-31", "2021-01-01")
w <- c("2011-01-01")
x <- c("2020-01-01")
y <- "quarter"
z <- 40
create_step_duration_max(u, v, w, x, y, z)

# Monthly
u <- rep("2011-01-01", 5)
v <- c("2011-01-01", "2011-02-01", NA, "2020-12-31", "2021-01-01")
w <- c("2011-01-01")
x <- c("2020-01-01")
y <- "month"
z <- 120
create_step_duration_max(u, v, w, x, y, z)


luke-a-rogers/mmmstan documentation built on Aug. 9, 2024, 3:13 a.m.