Description Usage Arguments Value
make_period_col
1 | make_period_col(df, colname, split_dates, period_labels, new_colname)
|
df |
data frame to which we want to add a period column |
colname |
column in df containing all the dates on which the period established |
split_dates |
vector of strings representing the date cut-offs of the periods. Note the first entry must a date before the earliest date in colname and the last date must be a date after the final date in colname |
period_labels |
labels for periods split by split_dates |
new_colname |
name of new column created containing the period into which the date falls |
df with an extra column of periods
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.