title: Why am I getting "Error: Problem with `mutate()` column `regression1`"?
body: <p>I am working on an assignment where I have to evaluate the predictive model based on RMSE (Root Mean Squared Error) using the test data. I have already built a linear regression model to predict wine quality (numeric) using all available predictor variables based on the train data. Below is my current code. The full error is <strong>&quot;Error: Problem with <code>mutate()</code> column <code>regression1</code>.
  i <code>regression1 = predict(regression1, newdata = my_type_test)</code>.
  x no applicable method for 'predict' applied to an object of class &quot;c('double', 'numeric')&quot;</strong></p>
  <pre><code>install.packages(&quot;rsample&quot;)
  library(rsample)
  
  my_type_split &lt;- initial_split(my_type, prop = 0.7)
  my_type_train &lt;- training(my_type_split)
  my_type_test &lt;- testing(my_type_split)  
  
  my_type_train
  
  regression1 &lt;- lm(formula = quality ~ fixed.acidity + volatile.acidity + citric.acid + chlorides + free.sulfur.dioxide + total.sulfur.dioxide +
                    density + pH + sulphates + alcohol, data = my_type_train)
  
  summary(regression1)
  regression1
  
  install.packages(&quot;caret&quot;)
  library(caret)
  install.packages(&quot;yardstick&quot;)
  library(yardstick)
  library(tidyverse)
  
  my_type_test &lt;- my_type_test %&gt;% 
    mutate(regression1 = predict(regression1, newdata = my_type_test)) %&gt;%
    
  rmse(my_type_test, price, regression1)
  </code></pre>