date_cuts {lares} | R Documentation |
Convert Date into Year + Cut
Description
This function returns categorical values for any date(s) using year cuts such as bimonths, quarters, terms, and halves.
Usage
date_cuts(date = Sys.Date(), type = "Q")
Arguments
date |
Date. Date we wish to transform |
type |
Character. Any of the following: B (2 months), Q (3 months), T (4 months), H (6 months) |
Value
Vector with date cut for each date
See Also
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_feats()
,
file_name()
,
formatHTML()
,
holidays()
,
impute()
,
left()
,
normalize()
,
num_abbr()
,
ohe_commas()
,
ohse()
,
quants()
,
removenacols()
,
replaceall()
,
replacefactor()
,
textFeats()
,
textTokenizer()
,
vector2text()
,
year_month()
,
zerovar()
Examples
date_cuts(Sys.Date(), type = "Q")
date_cuts(Sys.Date(), type = "H")
[Package lares version 5.2.8 Index]