calculate_events: Calculate past and next events given a clean_date

Description Usage Arguments Details Value Examples

View source: R/calculate_events.R

Description

When entered a 'date', calculate all last events and time until the next event. An event is a combination of at least two same values in the four-tuple: (year, month, week, day), for instance (1, 0, 1, 1) indicating a triple, namely 1 year, 1 week and 1 day soberness.

Usage

1
calculate_events(clean_date)

Arguments

clean_date

Date

Details

(x, 0, 0, 0): single (0, 0, x, x), (0, x, x, 0), ... : double (0, x, x, x), (x, x, x, 0), ... : triple (x, x, x, x): quartruble

Value

data.table

Examples

1
result <- calculate_events(lubridate::ymd("2012-02-20"))

feinmann/sober documentation built on March 25, 2020, 12:09 a.m.