title: Warning message: 'newdata' had 1 row but variables found have 31 rows
body: <p>I am trying to fit multiple regression model on a training dataset. When i use the model to predict output on test data. it is showing 'Warning message: 'newdata' had 1 row but variables found have 31 rows'. I am attaching the part of code I am working on </p>
  
  <pre><code>data_train&lt;-data_train[-17,]
  test_data&lt;-data_train[17,]
  mymodel&lt;-lm(data_train$TW~data_train$CD+data_train$FR+data_train$SS+data_train$CL+data_train$P, data_train)
  a&lt;-predict(mymodel, test_data)
  </code></pre>