Cast partial time to timespan, representing uncertainty as a range
Source:R/class_timespan_coercion.R
vec_cast.timespan.character.Rd
Cast partial time to timespan, representing uncertainty as a range
Usage
# S3 method for timespan.character
vec_cast(x, to, ..., format = parse_iso8601_datetime_as_timespan)
Arguments
- x
Vectors to cast.
- to
Type to cast to. If
NULL
,x
will be returned as is.- ...
For
vec_cast_common()
, vectors to cast. Forvec_cast()
,vec_cast_default()
, andvec_restore()
, these dots are only for future extensions and should be empty.- format
a
function
orcharacter
value. If afunction
, it should accept a character vector and return a matrix of parttime components. If acharacter
it should provide a regular exprssion which contains capture groups for each of the parttime components. See parse_to_parttime_matrix'sregex
parameter for more details.