get_internal_timestep: Get internal timestep

get_internal_timestepR Documentation

Get internal timestep

Description

This function converts the string representation of the timestep to its corresponding numeric value or returns the numeric input (if it is a whole number). For "day", "week", it returns 1 and 7 respectively. For "month", it returns "month" as months are not a fixed number of days. If the input is a numeric whole number, it is returned as is.

Usage

get_internal_timestep(timestep)

Arguments

timestep

The timestep to used. This can be a string ("day", "week", "month") or a numeric whole number representing the number of days.

Value

A numeric value representing the number of days for "day" and "week", "month" for "month", or the input value if it is a numeric whole number.

See Also

Utility functions aggregate_rolling_sum(), coerce_date(), coerce_dt(), date_to_numeric_modulus(), is.Date(), stan_fns_as_string()


seabbs/epinowcast documentation built on Aug. 28, 2024, 12:31 p.m.