title: R Predict function using a character variable as the model name
body: <p>I have my model name as a variable:</p>
  <pre><code>model &lt;- paste0(&quot;GBM_&quot;,risk_code,&quot;_&quot;,risk_category, sep = &quot;&quot;)
  </code></pre>
  <p>And want to predict based on this name:</p>
  <pre><code>pred1 &lt;- predict(model, n.trees = model$n.trees, data)
  </code></pre>
  <p>I want to run a loop to predict for multiple different model names.</p>
  <p>Thanks</p>