powered by
Separates a column containing coded year and coded month separated by "-" into two columns and removes the input column.
cs_parse_month(.data, var, yearVar, monthVar)
A tibble or data frame
the variable containing coded month and coded year
the name of the column to contain the year data
the name of the column to contain month data
Returns a copy of the object with two new columns for the coded year and coded month appended to it.
# NOT RUN { # load example data testData <- january2018 # parse CodedMonth testData <- cs_parse_month(testData, var = coded_month, yearVar = reportYear, monthVar = reportMonth) # }
Run the code above in your browser using DataLab