How do I load data in a job in Azure Machine Learning using R?

Garcia, Martin 0 Reputation points
2023-07-19T17:12:20.4766667+00:00

Currently trying to create a job Azure Machine Learning. I created a yaml file, registered a data set, and have a corresponding R script. However not sure what my default value should be using the optparse package and how to load the data as a nice dataframe.

Syntax for files:

library(optparse)

parser <- OptionParser()

parser <- add_option(
  parser,
  "--data_file",
  type = "character",
  action = "store",
  default = "" <-- not sure what goes here, or how to reference the data asset
)

args <- parse_args(parser)
command: >
Rscript r-source.R
--data_file ${{inputs.datafile}}  
code: src   # this is the code directory
  inputs:
    datafile: # this is a registered data asset
      type: uri_file
      path: azureml:dummy_data@latest 
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,112 questions
{count} votes

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.