Azure ML Package-Part1

Azure ML Package is another Microsoft related package that allows you to upload and download datasets to and from AzureML, to interrogate experiments, to publish R functions as AzureML web services, and to run R data through existing web services and retrieve the output.

Azure ML in R studio

The first step- Installation

First, you need to install.package(“AzureML”) command to install this package into your R version.

using below command:


Second Step- get the ID  and Authentication from Azure ML

the second step is to get some of the identification from the Azure ML studio setting. you need to navigate to “”

in your Azure ML environment click on the setting, there is a “workspaceid” copy the number.

in R studio assign the number to a variable as below

id<- "your workspace ID"

then navigate to another tab in setting menu and choose the “Authentication tokens”, copy the primary authentication token and allocate it to a variable in R studio.

auth<-"your authorization token"

There is a function in AzureML package name “workspace” that creates a reference to an AzureML Studio workspace by getting the authentication token and workspace id as below:

ws <- workspace( id , auth  )

to work with other AzureML packages you need to pass this object to them.

for instance for exploring the all experiments in Azure ML there is a function name “experiments” that gets the “ws” object as input to connect the desire azure ml environment and also a filter.

Step Three- Browse the Experiments

experiments(ws, filter = "all")

as you know in Azure ML studio we have 2 experiment type ” samples” and “my experiment” .

in experiments function you able to mention which experiment you want to see the details, so the filter values will be “all”, “samples” and “my datasets”.

I set it to “all”. by applying the “names” function, you able to see the columns: the experimentation is, name, versions, owner, and so forth.

Step Four- Upload a dataset and Browse Datasets

there is a possibility to upload a dataset from R studio into Azure ML by command upload.dataset

there is a free dataset in “ggplot2” package, that I am going to upload it to the Azure Ml studio.


you need to provides the dataset, the workstation objects (ws), and a name that you want to save the dataset in Azure ML environment.

Now if you explore the datasets in Azure ML, you able to see the new uploaded dataset there.

dataAzureML<-datasets(ws,filter = "my datasets")

some of the information such as name, size and so forth will be shown.

IN the next posts, I will show how to upload a function as web service into Azure ML environment.

Leila Etaati on LinkedinLeila Etaati on TwitterLeila Etaati on Youtube
Leila Etaati
Trainer, Consultant, Mentor
Leila is the first Microsoft AI MVP in New Zealand and Australia, She has Ph.D. in Information System from the University Of Auckland. She is the Co-director and data scientist in RADACAD Company with more than 100 clients in around the world. She is the co-organizer of Microsoft Business Intelligence and Power BI Use group (meetup) in Auckland with more than 1200 members, She is the co-organizer of three main conferences in Auckland: SQL Saturday Auckland (2015 till now) with more than 400 registrations, Difinity (2017 till now) with more than 200 registrations and Global AI Bootcamp 2018. She is a Data Scientist, BI Consultant, Trainer, and Speaker. She is a well-known International Speakers to many conferences such as Microsoft ignite, SQL pass, Data Platform Summit, SQL Saturday, Power BI world Tour and so forth in Europe, USA, Asia, Australia, and New Zealand. She has over ten years’ experience working with databases and software systems. She was involved in many large-scale projects for big-sized companies. She also AI and Data Platform Microsoft MVP. Leila is an active Technical Microsoft AI blogger for RADACAD.

Leave a Reply