Trying to use tidyr::fill()
to fill in the blanks in the inception_date
and expiry_date
fields (filling in a downward direction) in a test data set:
Having trouble. If I run, for example:
library(dplyr)
library(tidyr)
test <- test %>%
mutate(new_inception_date = fill(inception_date, .direction = "down"))
I get an error message
no applicable method for 'fill' applied to an object of class "Date"
Does fill()
not work with date fields? Is there a workaround?
Thank you.