vec_cast.timespan.character {parttime}R Documentation

Cast partial time to timespan, representing uncertainty as a range

Description

Cast partial time to timespan, representing uncertainty as a range

Usage

## S3 method for class '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. For vec_cast(), vec_cast_default(), and vec_restore(), these dots are only for future extensions and should be empty.

format

a function or character value. If a function, it should accept a character vector and return a matrix of parttime components. If a character it should provide a regular exprssion which contains capture groups for each of the parttime components. See parse_to_parttime_matrix's regex parameter for more details.

Value

A partial_timespan vector


[Package parttime version 0.1.2 Index]