# NOT RUN {
# }
# NOT RUN {
# define some transformations
library(pmml)
library(pmmlTransformations)
irisBox <- WrapData(iris)
irisBox <- ZScoreXform(irisBox,xformInfo = "column1->d1")
irisBox <- ZScoreXform(irisBox,xformInfo = "column2->d2")
#make a LocalTransformations element and save it to an external file
pmml_trans <- pmml(NULL, transforms=irisBox)
write(toString(pmml_trans),file = "xform_iris.pmml")
# Later, we may need to read in the PMML model into R
# 'lt' below is now a XML Node, as opposed to a string
lt <- fileToXMLNode("xform_iris.pmml")
# }
Run the code above in your browser using DataCamp Workspace