mrsdeploy R package - ServiceOption data-dir


The mrsdeploy package provides functions for establishing a remote session in a console application and for publishing and managing a web service that is backed by the R code block or script you provided.

When you publish a service there two input parameters code and model which can come from files path that can be .R script file or .Rdata file. These files can be in current working directory or can be in different directories.

When working with mrsdeploy package we can set the base path that will be used during publish service call. This base path will be used as default path for that session where publish service will look for files in that path for code and model fields and use them to publish it to server. Once the service is published the path is irrelevant on the R server O16N side. When we consume the service code and model details that is present in the .R or .Rdata file will be automatically loaded into R session on R O16N server.

Base path that will be used in publish service can be set using ServiceOption as part of mrsdeploy package, there are 3 ways to set the data-dir options

Set data-dir to NULL

Default value for data-dir is null, which implies current working directory will be used to look for files for code and model values during publishService()

Set data-dir to Empty

When we set data-dir to empty, we need to provide FULLY QUALIFIED path for code and model parameters in publishService()

Set data-dir to base path

When we set data-dir to base path, it will be appended to file path provide in code and model parameters.

 

Click here to know more about MRS Deploy R Package and Functions

Comments (0)

Skip to main content