Warning message 'newdata' had 1 row but variables found have 16 rows in R
问题 I am suppose to use the predict function to predict when fjbjor is 5.5 and I always get this warning message and I have tried many ways but it always comes so is there anyone who can see what I am doing wrong here This is my code fit.lm <- lm(fjbjor~amagn, data=bjor) summary(fit.lm) new.bjor<- data.frame(fjbjor=5.5) predict(fit.lm,new.bjor) and this comes out 1 2 3 4 5 6 7 8 9 10 11 5.981287 2.864521 9.988559 5.758661 4.645530 2.419269 4.645530 5.313409 6.871792 3.309773 4.200278 12 13 14 15