parttime0.1.2 package

Partial Datetime Handling

as.interval-partial_time-method

Wrapper for lubridate as.interval

as.interval-timespan-method

Wrapper for lubridate as.interval

as.parttime

Coerce an object to a parttime object

as.timespan

Cast an object to a timespan

c.partial_time

Concatenate parttimes

definitely.partial_time_logical

Determine whether a partial_time logical matrix is definitely TRUE

definitely

"Definitely" generic for resolving uncertainty

dim.partial_time

parttime vector dimensions

dot-i

shorthand for converting dimnames to indices, for easier column subtra...

end

end S3 generic

eq_parttimes

Equal comparison handler for partial_time objects

extract

Similar to matrix and array [ behavior, but allows for providing a n...

format.partial_time

Format a parttime object

format.pillar_shaft_partial_time

parttime pillar formatting

format_field_matrix

Format individual components of a parttime matrix

has_partial

Test whether a partial_time object is incomplete

has_partial_date

Test whether a partial_time object's date components are incomplete

has_partial_time

Test whether a partial_time object's time components are incomplete

impute_time

Impute a partial time object with a timestamp or specific fields

includes.partial_time.partial_time

Test for whether a timestamp could be included within parttime uncerta...

includes.partial_time

Determine whether a partial time contains an object

includes

Determine whether one object includes another

is.na.partial_time

Check if elements of a partial time vector is NA

is.na.timespan

Check if elements of a partial time vector is NA

is.timespan

Shorthand for checking timespan inheritance

is_parttime

Shorthand for checking partial time inheritance

is_timespan

Shorthand for checking timespan inheritance

max.partial_time

Get the maximum of a parttime vector

min.partial_time

Get the minimum of aparttime vector

neq_parttimes

Not-equal comparison handler for partial_time objects

normalize_month_day

Normalize days in month back to day limit for a given month

obj_print_data.partial_time

parttime data output

obj_print_footer.partial_time

parttime footer

obj_print_header.partial_time

parttime output header

Ops.partial_time

Handler for Ops generics for partial_time objects

Ops.timespan

Handler for Ops generics for timespan objects

parse_failure_message

Format a message communicating parse failure information

parse_iso8601_helpers

Inspecting and manipulating intermediate iso8601 matrices

parse_iso8601_matrix

Parse an iso8601 datetime to a parttime-like matrix

parse_parttime

Parse cdisc datetime strings as parttime matrix

parttime

Create a parttime object

parttime_access_and_assign

Datetime component access and assignment functions

parttime_extract

Indexing operators for partial_time objects

parttime_logical

This class is purely for retaining logical information for immediate t...

pillar_shaft.partial_time

parttime as pillar shaft

plus-partial_time-Period-method

Addition of a lubridate Period to a parttime partial_time

pmax.partial_time

Get the elementwise maximum of parttime vectors

pmax

Maxima and Minima

pmin.partial_time

Get the elementwise minimum of parttime vectors

pmin

Maxima and Minima

possibly.partial_time_logical

Determine whether a partial_time logical matrix is possibly TRUE

possibly

"Possibly" generic for resolving uncertainty

propagate_na

Propegate field missingness from higher to lower resolution

re_cdisc_datetime

Regular expression for CDISC-style datetime parsing

re_iso8601

slightly modified from parsedate - added 'secfrac' capture group

reflow_fields

Reflow potentially invalid time components to adjacent fields

register_unknown_s3_generics

Export S3 generics only if as-of-yet unknown

sample_date_string_styles

Find unique forms of inputs

sample_partial_styles

Find unique forms of missingness

start

start S3 generic

timespan

Create a partial timespan object

to_gmt

Generic for coercing timestamps to GMT timezone

trim

Shorten a timespan

type_sum.partial_time

parttime type name

vec_cast.logical.partial_time

Cast partial time to logical

vec_cast.partial_time.character

Coerce character date representations to parttime objects

vec_cast.partial_time.default

Default handler for casting to a partial time

vec_cast.partial_time.matrix

Cast a matrix to a partial time

vec_cast.partial_time

Cast to partial time object

vec_cast.timespan.character

Cast partial time to timespan, representing uncertainty as a range

vec_cast.timespan.default

Default handler for casting to a timespan

vec_cast.timespan.double

Cast an array to a timespan

vec_cast.timespan.numeric

Cast an array to a timespan

vec_cast.timespan.partial_time

Cast partial time to timespan, representing uncertainty as a range

vec_cast.timespan

Cast to timespan object

vec_ptype_abbr.partial_time

Abbreviated partial time class name

vec_ptype_full.partial_time

Full parttime class name

Datetimes and timestamps are invariably an imprecise notation, with any partial representation implying some amount of uncertainty. To handle this, 'parttime' provides classes for embedding partial missingness as a central part of its datetime classes. This central feature allows for more ergonomic use of datetimes for challenging datetime computation, including calculations of overlapping date ranges, imputations, and more thoughtful handling of ambiguity that arises from uncertain time zones. This package was developed first and foremost with pharmaceutical applications in mind, but aims to be agnostic to application to accommodate general use cases just as conveniently.

  • Maintainer: Doug Kelkhoff
  • License: MIT + file LICENSE
  • Last published: 2024-01-24