I updated my r to 4.2.1 and I ran into this error with epiweek. epiweek is a lubridate function before the update, but it may be changed now to the package grate, causing the problem. Please see below Please let me know how to create the lubridate::epiweek function with the grate package or any other packages:functions. Thanks!
dataset$epi_week <- str_pad(epiweek(dataset$epi_date_V3),2,pad="0")
Error in epiweek(dataset$epi_date_V3) :
year
must be integer.