I tried it previously, and still got the same error message when trying to load library(forecast) or library(caret)
library(forecast)
library(caret)