This function extracts a specific date component from a date-time variable in a dataframe.
Arguments
- data
The dataframe containing the date-time variable.
- var
The name of the date-time variable to extract the component.
- comp
The date component wanted from the variable. See
iNZightTools:::inz_dt_comp
for the full list of components.- name
The name of the new column to store the extracted date component.