Learn R Programming

MobileTrigger (version 0.0.31)

GetModel: Get Model for Trigger Processing

Description

Function loads a model from the TRIGGER_PATH]/Models/ folder saved as a *.Rdata file. The Model is then applied to input data collected from an e-mail trigger via the MobileTrigger::MailTriggerInput() function

Usage

GetModel(ID = NULL, path = NULL)

Arguments

ID

integer, Model ID value determined from MobileTrigger::ListModels() output when SelectMDL = NULL

path

string, path to the /Models/ folder.

Value

A model into the environment

Examples

Run this code
# NOT RUN {
################################
# Get Model                    #
################################
  MODELPATH <- "C:/Triggers/Models/"
  MDL <- GetModel(ID = 1, path = MODELPATH)
## To predict use:
  predict(MDL[[1]], newdata) # to get the model use the MDL[[1]]
# }

Run the code above in your browser using DataLab