split_unit: Split a unit string

Description Usage Arguments Value Author(s)

View source: R/times.r

Description

Splits a unit string (e.g., "2 weeks") into the amount (2) and unit ("weeks")

Usage

1
split_unit(unit_string)

Arguments

unit_string

the string to split

Value

a list with two elements, "num" (the amount) and "unit", , for use with lubridate::period

Author(s)

Sebastian Funk


rbi.helpers documentation built on July 2, 2020, 4:10 a.m.