Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Add custom parameters to my script


View products that this article applies to.

Problem

I can edit the scripts now, I see no way to add custom parameters to my script. The Script Execution Parameters pane always have the same two input fields “Quick Inputs” and “R objects” but the sample scripts that got installed with DeployR (like “DeployR – Hello World.R”) have all kinds of custom parameters in that pane with sliders, etc. How do I add those to my own scripts?

↑ Back to the top


Solution

Assuming you are developing your R scripts in their preferred R IDE, like RStudio, you first need to install the RevoScriptTools package in their R IDE environment.

That R package archive can be found here:

$REVODEPLOYR_HOME/rserve/RScripts/RevoScriptTools_1.0-1.tar.gz

So for example, on a Linux machine following a non-root install that path would look something like this:

/home/deployr-user/deployr/7.1.0/rserve/RScripts/RevoScriptTools_1.0-1.tar.gz

In RStudio just click on the Packages tab in the bottom-right panel and add the package. Or the customer can install the package manually:

R CMD INSTALL RevoScriptTools_1.0-1.tar.gz

Once that package has been installed the you can start using the revoPackage() and revoInput() functions to define package/input dependencies for their scripts.

To view the help for the package just type:

??RevoScriptTools

The help introduces the package and details how to use the revoPackage() and revoInput() functions.

If you uploads a script using these functions into the Repository Manager then the top-right panel under the Test tab will render the desired input controls.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3104175
Revision : 1
Created on : 1/7/2017
Published on : 10/31/2015
Exists online : False
Views : 59