Azure ML Package-Publish a Web service from R-Part2

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

In the last post, I have explained, how to use AzureML package with the aim of exploration of Azure ML studio experiments and datasets inside R studio environment. moreover how we can use this package to upload a dataset from R studio into Azure ML has been shown.

In this post, I am going to show you how we can create a function inside R and then publish an API from it.

imagine we have a function for the adding two number in R studio as below there

is a function of the AzureML package “publishWebService” that able to publish function in R studio into Azure Ml as API.

this function gets :

1- ws, information about the web service that has been explained in the last post,

2-fnn, the name of the function

3- name, the name that we want to display it in the Azure environment

4- input dataset, as a list

5-output dataset as a list

NOTE: when you run the code, it may ask you to install zip, you able to handle the error by downloading one version of Rtools into your machine from https://cran.r-project.org/bin/windows/Rtools/

Just go and check the web service in Azure ML,  you will see the function in top of the list (see below)

you able to test it

Moreover, you able to share the API key and URL with any other application, language to have smarter application.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail
rssyoutuberssyoutube
Leila Etaati
Dr. Leila Etaati is Principal Data Scientist, BI Consultant, and Speaker. She has over 10 years’ experience working with databases and software systems. She was involved in many large-scale projects for big sized companies. Leila has PhD of Information System department, University of Auckland, MS and BS in computer science. Leila is Microsoft Data Platform MVP.

Leave a Reply

Your email address will not be published. Required fields are marked *