Execute R Script in ML Studio

Graham Benson 126 Reputation points
2021-07-23T05:13:03.467+00:00

Hi,

I am trying to runt the following R Script in an 'Execute R Script' module in Machine Learning Studio.

data.set <- data.frame(installed.packages())
maml.mapOutputPort("data.set")

This script is taken from the 'Get started with Machine Learning Studio (classic)' in R page (https://learn.microsoft.com/en-au/azure/machine-learning/classic/r-get-started#timeseries)

Whilst it works in ML (classic) I receive the following error when running it in Machine Learning Studio;

Error in maml.mapOutputPort("data.set"): could not find function "maml.mapOutputPort"

What additional config settings are needed to enable R scripts in ML Studio?

Thank you.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,334 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 48,906 Reputation points Microsoft Employee Moderator
    2021-07-23T08:21:10.717+00:00

    @Graham Benson For the designer version of the Azure ML studio you could follow the steps in this document to install the packages and run any R scripts. Unlike the classic version you need to select or create compute for your experiment before the experiment can be submitted.

    Example for installing a package:

    azureml_main <- function(dataframe1, dataframe2){  
      print("R script run.")  
        
      if(!require(zoo)) install.packages("zoo",repos = "http://cran.us.r-project.org")  
      library(zoo)  
      # Return datasets as a Named List  
      return(list(dataset1=dataframe1, dataset2=dataframe2))  
    }  
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.