SmartCane/old_working_utils.R
2026-01-06 14:17:37 +01:00

14 lines
810 B
R
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# utils for mosaic creation
date_list <- function(end_date, offset){
offset <- as.numeric(offset) - 1
end_date <- as.Date(end_date)
start_date <- end_date - lubridate::days(offset)
week <- week(start_date)
year <- year(start_date)
days_filter <- seq(from = start_date, to = end_date, by = "day")
return(list("week" = week, "year" = year, "days_filter" = days_filter))
}