warning when calculating predicted values
working with a data frame x Date Val 1/1/2012 7 2/1/2012 9 3/1/2012 20 4/1/2012 24 5/1/2012 50 a <- seq(as.Date(tail(x, 1)$Date), by="month", length=5) a <- data.frame(a) x.lm <- lm(x$Val ~ x$Date) x.pre<-predict(x.lm, newdata=a) I am getting this erro: Warning message: 'newdata' had 5 rows but variable(s) found have 29 rows what am I doing wrong? here is the dput output: dput(x) structure(list(Date = structure(c(14610, 14641, 14669, 14700, 14730, 14761, 14791, 14822, 14853, 14883, 14914, 14944, 14975, 15006, 15034, 15065, 15095, 15126, 15156, 15187, 15218, 15248, 15279, 15309, 15340, 15371,