title: Remove original data from regression_forest without changing the type to "list"
body: <p>I would like to estimate a regression_forest with the grf package and remove the original data that is stored in the regression_forest output for data protection reasons.</p>
  <p>The problem is that when I remove the data, R doesn't recognize the object as a regression_forest anymore and therefore throws an error.</p>
  <p>Does anyone know how to go around this problem?</p>
  <p>Here is a reproducible example:</p>
  <pre><code>library(grf)
  
  # Train a standard regression forest.
  n &lt;- 50
  p &lt;- 10
  X &lt;- matrix(rnorm(n * p), n, p)
  Y &lt;- X[, 1] * rnorm(n)
  r.forest &lt;- regression_forest(X, Y)
  
  # Remove the original data
  r.forest &lt;- r.forest[-c(18,19)]
  
  # Predict using the forest.
  X.test &lt;- matrix(0, 101, p)
  X.test[, 1] &lt;- seq(-2, 2, length.out = 101)
  r.pred &lt;- predict(r.forest, X.test)
  
  </code></pre>
  <p>The last line causes the following error:</p>
  <blockquote>
  <p>Error in UseMethod(&quot;predict&quot;) :  no applicable method for 'predict'
  applied to an object of class &quot;list&quot;</p>
  </blockquote>