Download PMML source from Zementis Server.

download_model(model_name, annotated = FALSE, ...)

Arguments

model_name

Name of the PMML model to download.

annotated

Logical indicating if server should return annotated PMML model source. The annotated source may contain warnings embedded in XML comments that are useful for debugging. (Default: FALSE)

...

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

A list with the following components:

  • model_name The model_name of the downloaded model including the suffix ".pmml".

  • model_source An S3 object of class XMLInternalDocument created by parsing the server response using XML::xmlParse().

See also

Examples

if (FALSE) { download_model("iris_model") # Download all models and save them to disk downloads <- get_models() %>% purrr::map(download_model) file_names <- purrr::map_chr(downloads, "model_name") purrr::walk2(purrr::map(downloads, "model_source"), file_names, XML::saveXML) }