title: Couldn't find a saved dataset
body: <pre><code>
  model_one &lt;-glm( 
    Survived ~ age_imputed,
    family = binomial(),
    data = train_imputed 
    )
  logistic_cv1 &lt;- cv.glm(train_imputed, model_1, cost, K=5)
  logistic_cv1$delta
  </code></pre>
  <p>I'm trying to use k-fold cross-validation to measure our model's performance on data. So I used glm function but after I run the code, this error message pops up,</p>
  <pre><code>Error in cv.glm(train_imputed, model_1, cost, K = 5) : object 'model_1' not found
  </code></pre>
  <p>How to fix this problem? I found it weird I saved model_1 as a new variable. But I couldn't find its dataset.</p>