pmml (version 1.5.4)

savePMML: saves a xml object as an external PMML file.

Description

A created pmml object can be saved for more efficient further processing via this function.

Usage

savePMML(doc, name, version=4.3)

Arguments

doc

the XML model created in R.

name

the name of the external file where the XML is to be saved.

version

the PMML version number the model is compliant with.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
 # make a sample model
 library(gbm)
 library(pmml)
 data(audit)

 mod<-gbm(Adjusted~.,data=audit[,-c(1,4,6,9,10,11,12)],n.trees=3,interaction.depth=4)
 pmod <- pmml(mod)
 # Save to an external file 
 savePMML(pmod, "GBMModel.pmml")
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace