Removed 4 redundant packages (timetk, kknn, kernlab, and caret).
summarise_by_time() function from the timetk package was being used to simultaneously aggregate dates and summarise the data. Now switched to using lubridate's floor_date() and summarise() that yeild the same results.
Note, runsd() of the caTools could be replaced with rollapply() in the zoo package (also being used for na.approx()). However, the function was running very slowly, so decided to stick with runsd().
Removed 4 redundant packages (timetk, kknn, kernlab, and caret).
summarise_by_time() function from the timetk package was being used to simultaneously aggregate dates and summarise the data. Now switched to using lubridate's floor_date() and summarise() that yeild the same results.
Note, runsd() of the caTools could be replaced with rollapply() in the zoo package (also being used for na.approx()). However, the function was running very slowly, so decided to stick with runsd().