Learn R Programming

ddeploy (version 1.0.4)

duke_deploy: Deploy model using REST API

Description

Deploy model using REST API

Usage

duke_deploy(auth_details, model_object, predict_udf = NULL, host_name = NULL)

Arguments

auth_details
authorization parameters (must be stored in list format: list(user_name='exampleusername',api_key='exampleapikey')).
model_object
the model to deploy e.g. lm() or glm() object.
predict_udf
user defined function as alternative to the built-in model object predict function.
host_name
optional parameter.

Value

Deployment status, success or failure with message.

See Also

duke_predict for making predictions with deployed models or duke_list to display a list of all deployed models.

Examples

Run this code
duke_auth <- list(
user_name = "try_it",
api_key   = "db1542b66f16aba5768d8a19c27dec4facf9168a",
endpoint = "/api/v1.0"
)
example_data <- as.data.frame(cbind(gl(3,50),rnorm(150)));names(example_data) <- c("x","y")
example_fit  <- lm(y~x,data=example_data)
duke_deploy(auth_details=duke_auth,model_object=example_fit)

Run the code above in your browser using DataLab