Package: parttime 0.1.2

parttime: Partial Datetime Handling

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.

Authors:Doug Kelkhoff [aut, cre], Bill Denney [ctb]

parttime_0.1.2.tar.gz
parttime_0.1.2.zip(r-4.5)parttime_0.1.2.zip(r-4.4)parttime_0.1.2.zip(r-4.3)
parttime_0.1.2.tgz(r-4.4-any)parttime_0.1.2.tgz(r-4.3-any)
parttime_0.1.2.tar.gz(r-4.5-noble)parttime_0.1.2.tar.gz(r-4.4-noble)
parttime_0.1.2.tgz(r-4.4-emscripten)parttime_0.1.2.tgz(r-4.3-emscripten)
parttime.pdf |parttime.html
parttime/json (API)
NEWS

# Install 'parttime' in R:
install.packages('parttime', repos = c('https://dgkf.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/dgkf/parttime/issues

On CRAN:

hacktoberfest

55 exports 17 stars 3.93 score 13 dependencies 3 scripts 232 downloads

Last updated 8 months agofrom:b2fc9e364d. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 20 2024
R-4.5-winOKSep 20 2024
R-4.5-linuxOKSep 20 2024
R-4.4-winOKSep 20 2024
R-4.4-macOKSep 20 2024
R-4.3-winOKSep 20 2024
R-4.3-macOKSep 20 2024

Exports:as.intervalas.parttimeas.timespandayday<-day<-.partial_timedefinitelyendhas_partialhas_partial_datehas_partial_timehourhour<-hour<-.partial_timeimpute_dateimpute_date_maximpute_date_midimpute_date_minimpute_timeimpute_time_maximpute_time_midimpute_time_minincludesis_partial_timeis_parttimeis_timespanis.partial_timeis.parttimeis.timespanmdaymday<-minuteminute<-minute<-.partial_timemonthmonth<-month<-.partial_timeparse_cdisc_datetimeparse_iso8601_datetimeparse_to_parttime_matrixparttimepmaxpminpossiblysecondsecond<-second<-.partial_timestarttimespanto_gmttztz<-yearyear<-year<-.partial_time

Dependencies:clicpp11crayonfansigenericsgluelifecyclelubridatepillarrlangtimechangeutf8vctrs

Readme and manuals

Help Manual

Help pageTopics
Addition of a lubridate Period to a parttime partial_time+,partial_time,Period-method
Wrapper for lubridate as.intervalas.interval,partial_time-method
Wrapper for lubridate as.intervalas.interval,timespan-method
Coerce an object to a parttime objectas.parttime
Cast an object to a timespanas.timespan
Concatenate parttimesc.partial_time
"Definitely" generic for resolving uncertaintydefinitely
Determine whether a partial_time logical matrix is definitely TRUEdefinitely.partial_time_logical
parttime vector dimensionsdim.partial_time
end S3 genericend
Format a parttime objectformat.partial_time
parttime pillar formattingformat.pillar_shaft_partial_time
Test whether a partial_time object is incompletehas_partial
Test whether a partial_time object's date components are incompletehas_partial_date
Test whether a partial_time object's time components are incompletehas_partial_time
Impute a partial time object with a timestamp or specific fieldsimpute_date impute_date_max impute_date_mid impute_date_min impute_time impute_time.default impute_time.partial_time impute_time.POSIXt impute_time_max impute_time_mid impute_time_min
Determine whether one object includes anotherincludes
Determine whether a partial time contains an objectincludes.partial_time
Test for whether a timestamp could be included within parttime uncertaintyincludes.partial_time.partial_time
Shorthand for checking partial time inheritanceis.partial_time is.parttime is_partial_time is_parttime
Shorthand for checking timespan inheritanceis_timespan
Check if elements of a partial time vector is NAis.na.partial_time
Check if elements of a partial time vector is NAis.na.timespan
Shorthand for checking timespan inheritanceis.timespan
Get the maximum of a parttime vectormax.partial_time
Get the minimum of aparttime vectormin.partial_time
Normalize days in month back to day limit for a given monthnormalize_month_day
parttime data outputobj_print_data.partial_time
parttime footerobj_print_footer.partial_time
parttime output headerobj_print_header.partial_time
Handler for Ops generics for partial_time objectsOps.partial_time
Handler for Ops generics for timespan objectsOps.timespan
Create a parttime objectparttime
Datetime component access and assignment functionsday day<- day<-,partial_time-method day<-.partial_time hour hour.partial_time hour<- hour<-,partial_time-method hour<-.partial_time mday mday.partial_time mday<- minute minute.partial_time minute<- minute<-,partial_time-method minute<-.partial_time month month.partial_time month<- month<-,partial_time-method month<-.partial_time parttime_access_and_assign second second.partial_time second<- second<-,partial_time-method second<-.partial_time tz tz.partial_time tz<- tz<-.partial_time year year.partial_time year<- year<-,partial_time-method year<-.partial_time
Indexing operators for partial_time objectsparttime_extract [.partial_time [<-.partial_time [[.partial_time [[<-.partial_time
parttime as pillar shaftpillar_shaft.partial_time
Maxima and Minimapmax
Get the elementwise maximum of parttime vectorspmax.partial_time
Maxima and Minimapmin
Get the elementwise minimum of parttime vectorspmin.partial_time
"Possibly" generic for resolving uncertaintypossibly
Determine whether a partial_time logical matrix is possibly TRUEpossibly.partial_time_logical
Reflow potentially invalid time components to adjacent fieldsreflow_fields
start S3 genericstart
Create a partial timespan objecttimespan
Generic for coercing timestamps to GMT timezoneto_gmt
Shorten a timespantrim
parttime type nametype_sum.partial_time
Cast partial time to logicalvec_cast.logical.partial_time
Cast to partial time objectvec_cast.partial_time
Coerce character date representations to parttime objectsvec_cast.partial_time.character
Default handler for casting to a partial timevec_cast.partial_time.default
Cast a matrix to a partial timevec_cast.partial_time.matrix
Cast to timespan objectvec_cast.timespan
Cast partial time to timespan, representing uncertainty as a rangevec_cast.timespan.character
Default handler for casting to a timespanvec_cast.timespan.default
Cast an array to a timespanvec_cast.timespan.double
Cast an array to a timespanvec_cast.timespan.numeric
Cast partial time to timespan, representing uncertainty as a rangevec_cast.timespan.partial_time
Abbreviated partial time class namevec_ptype_abbr.partial_time
Full parttime class namevec_ptype_full.partial_time