Don't worry I can see my typo.  Sorry for the posting!
 
 
> bag.model <- bagging(as.factor(nextDay) ~ ., data = spi[1:1250,])
> pred = predict(bag.model, spi[1251:13500,-9])
There were 25 warnings (use warnings() to see them)
> t = table(pred, spi[1251:13500,9])
> t
    

	[[alternative HTML version deleted]]


