Package: cstime 2023.5.3

Chi Zhang

cstime: Date and Time Functions for Public Health Purposes

Provides easy and consistent time conversion for public health purposes. The time conversion functions provided here are between date, ISO week, ISO yearweek, ISO year, calendar month/year, season, season week.

Authors:Chi Zhang [aut, cre], Richard Aubrey White [aut], CSIDS [cph]

cstime_2023.5.3.tar.gz
cstime_2023.5.3.zip(r-4.5)cstime_2023.5.3.zip(r-4.4)cstime_2023.5.3.zip(r-4.3)
cstime_2023.5.3.tgz(r-4.4-any)cstime_2023.5.3.tgz(r-4.3-any)
cstime_2023.5.3.tar.gz(r-4.5-noble)cstime_2023.5.3.tar.gz(r-4.4-noble)
cstime_2023.5.3.tgz(r-4.4-emscripten)cstime_2023.5.3.tgz(r-4.3-emscripten)
cstime.pdf |cstime.html
cstime/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/csids/cstime/issues

Datasets:

On CRAN:

csverse

33 exports 1.47 score 2 dependencies 2 dependents 7 scripts 1.3k downloads

Last updated 3 months agofrom:6a23b889af. Checks:OK: 7. Indexed: yes.

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

Exports:date_to_calmonth_cdate_to_calmonth_ndate_to_calyear_cdate_to_calyear_ndate_to_calyearmonth_cdate_to_isoquarter_cdate_to_isoquarter_ndate_to_isoweek_cdate_to_isoweek_ndate_to_isoyear_cdate_to_isoyear_ndate_to_isoyearquarter_cdate_to_isoyearweek_cdate_to_season_cdate_to_seasonweek_nisoweek_to_seasonweek_nisoyear_to_last_dateisoyear_to_last_isoweek_nisoyear_to_last_isoyearweek_cisoyearweek_to_isoquarter_cisoyearweek_to_isoquarter_nisoyearweek_to_isoweek_cisoyearweek_to_isoweek_nisoyearweek_to_isoyear_cisoyearweek_to_isoyear_nisoyearweek_to_isoyearquarter_cisoyearweek_to_last_dateisoyearweek_to_season_cisoyearweek_to_seasonweek_nnow_cseason_to_last_dateseasonweek_to_isoweek_cseasonweek_to_isoweek_n

Dependencies:data.tablemagrittr

Date, year, week conversion

Rendered fromdate_conversion.Rmdusingknitr::rmarkdownon Sep 11 2024.

Last update: 2022-11-22
Started: 2022-01-31

Intro to cstime

Rendered fromcstime.Rmdusingknitr::rmarkdownon Sep 11 2024.

Last update: 2022-11-22
Started: 2022-11-22

Season week

Rendered fromseason.Rmdusingknitr::rmarkdownon Sep 11 2024.

Last update: 2022-11-22
Started: 2022-01-31

Readme and manuals

Help Manual

Help pageTopics
Date -> calmonth (character)date_to_calmonth_c date_to_calmonth_c.character date_to_calmonth_c.Date date_to_calmonth_c.default
Date -> calmonth (numeric)date_to_calmonth_n date_to_calmonth_n.character date_to_calmonth_n.Date date_to_calmonth_n.default
Date -> calyear (character)date_to_calyear_c date_to_calyear_c.character date_to_calyear_c.Date date_to_calyear_c.default
Date -> calyear (numeric)date_to_calyear_n date_to_calyear_n.character date_to_calyear_n.Date date_to_calyear_n.default
Date -> calyearmonth (character)date_to_calyearmonth_c date_to_calyearmonth_c.character date_to_calyearmonth_c.Date date_to_calyearmonth_c.default
ISO quarter (character) from Date objectdate_to_isoquarter_c date_to_isoquarter_c.character date_to_isoquarter_c.Date date_to_isoquarter_c.default
ISO quarter (numeric) from Date objectdate_to_isoquarter_n date_to_isoquarter_n.character date_to_isoquarter_n.Date date_to_isoquarter_n.default
ISO week (character) from Date objectdate_to_isoweek_c date_to_isoweek_c.character date_to_isoweek_c.Date date_to_isoweek_c.default
ISO week (numeric) from Date objectdate_to_isoweek_n date_to_isoweek_n.character date_to_isoweek_n.Date date_to_isoweek_n.default
ISO year (character) from Date objectdate_to_isoyear_c date_to_isoyear_c.character date_to_isoyear_c.Date date_to_isoyear_c.default
ISO year (numeric) from Date objectdate_to_isoyear_n date_to_isoyear_n.character date_to_isoyear_n.Date date_to_isoyear_n.default
ISO year and quarter (character) from Date objectdate_to_isoyearquarter_c date_to_isoyearquarter_c.character date_to_isoyearquarter_c.Date date_to_isoyearquarter_c.default
ISO year and week (character) from Date objectdate_to_isoyearweek_c date_to_isoyearweek_c.character date_to_isoyearweek_c.Date date_to_isoyearweek_c.default
Date to season.date_to_season_c
Date to season week.date_to_seasonweek_n
Dates of different days within isoyearweeksdates_by_isoyearweek
ISO week to season week (numeric). Season week 1 is natural week 30.isoweek_to_seasonweek_n isoweek_to_seasonweek_n.character isoweek_to_seasonweek_n.default isoweek_to_seasonweek_n.numeric
Last Sunday in ISO yearisoyear_to_last_date isoyear_to_last_date.character isoyear_to_last_date.default isoyear_to_last_date.numeric
Last ISO week (numeric) in ISO yearisoyear_to_last_isoweek_n isoyear_to_last_isoweek_n.character isoyear_to_last_isoweek_n.default isoyear_to_last_isoweek_n.numeric
Last ISO yearweek (character) in ISO yearisoyear_to_last_isoyearweek_c isoyear_to_last_isoyearweek_c.character isoyear_to_last_isoyearweek_c.default isoyear_to_last_isoyearweek_c.numeric
ISO yearweek to quarter (character)isoyearweek_to_isoquarter_c isoyearweek_to_isoquarter_c.character isoyearweek_to_isoquarter_c.default
ISO yearweek to quarter (numeric)isoyearweek_to_isoquarter_n isoyearweek_to_isoquarter_n.character isoyearweek_to_isoquarter_n.default
ISO yearweek to week (character)isoyearweek_to_isoweek_c isoyearweek_to_isoweek_c.character isoyearweek_to_isoweek_c.default
ISO yearweek to week (numeric)isoyearweek_to_isoweek_n isoyearweek_to_isoweek_n.character isoyearweek_to_isoweek_n.default
ISO yearweek to year (character)isoyearweek_to_isoyear_c isoyearweek_to_isoyear_c.character isoyearweek_to_isoyear_c.default
ISO yearweek to year (numeric)isoyearweek_to_isoyear_n isoyearweek_to_isoyear_n.character isoyearweek_to_isoyear_n.default
ISO yearweek to ISO yearquarter (character)isoyearweek_to_isoyearquarter_c isoyearweek_to_isoyearquarter_c.character isoyearweek_to_isoyearquarter_c.default
Last date in ISO yearweekisoyearweek_to_last_date isoyearweek_to_last_date.character isoyearweek_to_last_date.default
ISO yearweek to season.isoyearweek_to_season_c isoyearweek_to_season_c.character isoyearweek_to_season_c.default
ISO yearweek to season week (numeric). Season week 1 is natural week 30.isoyearweek_to_seasonweek_n
keep_sundayskeep_sundays
keep_sundays_and_latest_datekeep_sundays_and_latest_date
keep_sundays_and_latest_date_internalkeep_sundays_and_latest_date_internal
Norwegian workdays and holidays by datenor_workdays_by_date
Norwegian workdays and holidays by isoyearweeknor_workdays_by_isoyearweek
Current time as characternow_c
Last date in seasonseason_to_last_date season_to_last_date.character season_to_last_date.default
Season week to ISO week (character). Season week 1 is ISO week 30.seasonweek_to_isoweek_c seasonweek_to_isoweek_c.default seasonweek_to_isoweek_c.numeric
Season week to ISO week (numeric). Season week 1 is ISO week 30.seasonweek_to_isoweek_n seasonweek_to_isoweek_n.default seasonweek_to_isoweek_n.numeric