0 votes
1 view
in Azure by (5.8k points)

I want to deploy a basic trained R model as a webservice to AzureML. Similar to what is done here: http://www.r-bloggers.com/deploying-a-car-price-model-using-r-and-azureml/

Since that post the publishWebService function in the R AzureML package was has changed it now requires me to have a workspace object as the first parameter thus my R code looks as follows:



    PredictionModel = lm( medv ~ lstat , data = Boston )

    PricePredFunktion = function(percent)

    {return(predict(PredictionModel, data.frame(lstat =percent)))}

    myWsID = "<my Workspace ID>"

    myAuth = "<my Authorization code"

    ws = workspace(myWsID, myAuth, api_endpoint = "https://studio.azureml.net/", .validate = TRUE)

    # publish the R function to AzureML

    PricePredService = publishWebService(




      list("lstat" = "float"),

      list("mdev" = "float"),




But every time I execute the code I get the following error:

    Error in publishWebService(ws, "PricePredFunktion", "PricePredOnline",  : 

    Requires external zip utility. Please install zip, ensure it's on your path and try again.

I tried installing programs that handle zip files (like 7zip) on my machine as well as calling the utils library in R which allows R to directly interact with zip files. But I couldn't get rid of the error.

I also found the R package code that is throwing the error, it is on line 154 on this page: https://github.com/RevolutionAnalytics/AzureML/blob/master/R/internal.R

but it didn't help me in figuring out what to do.

1 Answer

0 votes
by (9.5k points)

Well, you can now use R directly in Azure ML Studio. Add Execute R script into your experiment and write your R code.  

Welcome to Intellipaat Community. Get your technical queries answered by top developers !