deployR: deployR Function

Description Usage Details References Examples

Description

deployR is a utility that prepares an R Script for execution by MicroStrategy. It captures all the information required to properly execute the R Script into a comment block added to the beginning of the script.

Usage

1

Details

This function launches a user interface which allows the user to open an R Script and capture its “signature”, the nature of inputs and outputs along with other information about how the R analytic should be executed.

The deployR menu bar has the following functions:

To get started, click the Open button at the upper left to open your R script.

After you open your R script, the deployR utility parses the script to identify all potential variables.

The Use R Script Folder checkbox controls whether the path used to open the script will be used, or if the R Scripts folder will be used.

Next, modify the definition each variable as required to match the function's logic, by draging-and-droping variables to place them in the appropriate columns:

Set the Data Type of each variable to one of the following options:

Set the Parameter Type of each variable to one of the following options:

If one or more of the variables form a repeated argument, set the Repeat Count to match the number of repeat arguments. This option identifies an input that can vary in quantity; such variables are known as repeated arguments because they represent a varying number of variables. The Repeat Count value specifies how many of variables are repeated, counting back from the last variable. These variables always occur at the end of the list of arguments. These variables will appear in the Inputs column with an asterisk (*). Examples include:

The Metric Specification section contains the following options:

After you have configured the variables and specified the metric options, you can save the analytic's signature to the R script by clicking the Save button. Alternatively, you can use the Preview button to review the changes before saving.

Finally, after configuring your variables, saving the signature to your script and specifying the metric options, the R Analytic Deployer provides you with the metric expression for your analytic. The Metric Expression section at the bottom-right of the dialog shows the metric expression that defines how MicroStrategy interacts with your function. Click the Copy to Clipboard button and you're ready to paste this metric expression into any MicroStrategy Metric Editor (Desktop, Web and Visual Insight).

References

MicroStrategyR. http://RIntegrationPack.codeplex.com/.

Examples

1
2
3
## Not run: 
deployR()
## End(Not run)

MicroStrategyR documentation built on May 2, 2019, 3:42 a.m.