predictions_to_xml: Convert predictions to XML

Description Usage Arguments Value Examples

View source: R/predictions_to_xml.R

Description

This function aims to convert prediction from Health Module to XML format

Usage

1

Arguments

pred

a dataframe of prediction, i.e. a output from predict_hm.

file

[chr] (default is NULL) if provided as "path/to/xml/output/xml" the function write the XML in this file (note: folder must be exists).

Value

an (invisible) XML document

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  library(imthcm)
  default_models <- train_event_models(use_ita = TRUE)
  pred <- predict_hm(default_models,
    test_weather, test_weather[c(730L, 731L), ]
  )
  predictions_to_xml(pred, file = 'predictions.xml')
  imported_pred <- xml_to_prediction(file = 'predictions.xml')
  identical(pred, imported_pred)

## End(Not run)

UBESP-DCTV/imthcm documentation built on Dec. 2, 2019, 9:26 a.m.