Learn R Programming

runner (version 0.3.7)

reformat_k: Formats time-unit-interval to valid for runner

Description

Formats time-unit-interval to valid for runner

Usage

reformat_k(k, only_positive = TRUE)

Arguments

k

(k or lag) object from runner to be formatted

only_positive

for k is TRUE, for lag is FALSE

Examples

Run this code
# NOT RUN {
runner:::reformat_k("1 days")
runner:::reformat_k("day")
runner:::reformat_k("10 days")
runner:::reformat_k("-10 days", only_positive = FALSE)
runner:::reformat_k(c("-10 days", "2 months"), only_positive = FALSE)
# }

Run the code above in your browser using DataLab