title: How can I export a gbm model in R?
body: <p>Is there a standard (or available) way to export a gbm model in R?  PMML would work, but when I I try to use the pmml library, perhaps incorrectly, I get an error:</p>
  
  <p>For example, my code looks similar to this:</p>
  
  <pre><code>  library("gbm")
    library("pmml")
  
    model &lt;- gbm(
        formula,
        data = my.data,
        distribution = "adaboost",
        n.trees = 450,
        n.minobsinnode = 10,
        interaction.depth = 4, shrinkage=0.05, verbose=TRUE)
    export &lt;- pmml(model)
    # and then export to xml
  </code></pre>
  
  <p>And the error I get is:</p>
  
  <pre><code>Error in UseMethod("pmml") : no applicable method for 'pmml' applied to an object of class "gbm"
  </code></pre>
  
  <p>I've also tried passing in the dataset.  In any case, I could live with another format I can parse programmatically (I'll be scoring on the JVM) but PMML would be great if there is a way to make that work.</p>