Odataset2 <- read.csv ("C:/Users/FBDA17-031/Documents/OlyDash/Odataset2.csv")
Odataset2 <- Odataset2%>%
mutate(model = ifelse(Date <= "Date", "train", "test"))
colnames(Odataset2)<- colnames(Date)
Odataset2 <- xts(Odataset2, as.Date(as.character(Odataset2$Date.To.Date), format="%m/%d/%Y"))
I keep getting the error below when running the code above,.. and can't seem to fix it
Error in xts(Odataset2, as.Date(as.character(Odataset2$Date.To.Date), : NROW(x) must match length(order.by)
what could be the problem?