upload_model: Upload new PMML model

Description Usage Arguments Value Examples

View source: R/upload_model.R

Description

Upload new PMML source or serialized model file to Zementis Server.

Usage

1
upload_model(file, applyCleanser = TRUE, ...)

Arguments

file

Path to a file or a XMLNode object generated by pmml. The PMML model file can end in .xml, .pmml or even be .zip or .gzip compressed.

applyCleanser

Logical indicating if the server should perform cleansing on the PMML file. (Default: TRUE)

...

Additional arguments passed on to the underlying HTTP method. This might be necessary if you need to set some curl options explicitly via config.

Value

If a model with the same name already exists on the server or if is not valid PMML, an error. Otherwise a list with the following components:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 ## Not run: 
   #Build a simple lm model
   iris_lm <- lm(Sepal.Length ~ ., data=iris)
   # Convert to pmml and save to disk
   iris_pmml <- pmml::pmml(iris_lm, model.name = "iris_model")
   saveXML(iris_pmml, "iris_pmml.xml")

   # Upload model to server
   upload_model("iris_pmml.xml")

   # Second option: Upload XMLNode object directly
   iris_pmml <- pmml::pmml(iris_lm, model.name = "iris_model_opt2")
   upload_model(iris_pmml)
 
## End(Not run)

alex23lemm/zementisr documentation built on Jan. 9, 2020, 1:49 a.m.