EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB43665: How to use R Integration Pack in MicroStrategy?


Community Admin

• Strategy


R Integration Pack and its deployR utility provide the metric expression of each potential output. The metric expression can be pasted into any MicroStrategy metric editor for deploying the R Analytic to MicroStrategy for execution

1. Introduction:
R Integration Pack is a feature to deploy R Analytics to Strategy easily. The R Integration Pack is an evolution of previous FPWizard, an alternative approach to deploying analytics from R to Strategy. For more details regarding Strategy Function Plug-in Wizard, refer to the following Technical Note in Knowledge Base: KB41636: How to Integrate R functions into MicroStrategy 9.4.x or greater
R Integration Pack and its deployR utility provide the metric expression of each potential output. The metric expression can be pasted into any Strategy metric editor for deploying the R Analytic to Strategy for execution. Watch video below about how R Integration Pack works in Strategy 9.4.x:
Demo: http://youtu.be/vvrhXlYSvYQ
The following chart shows the differences between previous Strategy R Function Plug-ins and R Integration Pack.
 

ka04W00000148JNQAY_0EM440000002CnV.png

 
2. Prerequisites:
Strategy

  • Strategy version 9.2.1 or higher must be installed. An exception is that to deploy a new R analytic as a derived metric in Visual Insight requires version 9.3.1.
  • Strategy Architect is necessary for the one-time addition of the common RScript functions.

R

  • R must be installed on systems that will execute the R analytics deployed to Strategy. This includes the Strategy Intelligence Server and any Strategy Desktop clients that execute R analytics as derived metrics. R is not required on other clients such Strategy Web, Strategy Mobile, Strategy Visual Insight and Strategy Office since they are consumers of analytics deployed to the Strategy Intelligence Server.
  • R can be installed from http://CRAN.R-project.org.
  • If the R Analytic has dependencies on add-on packages that are not included standard with R, those packages must also be added to the R installation on the Strategy systems.

3. Download R Integration Pack
 
The R Integration Pack consists of two main components: 
RScript Functions Installer: This installer adds a set of functions to Strategy that are used for executing analytics in R. These functions are required to execute your R analytic using Strategy. You can download the appropriate installer for your operating system from: http://rintegrationpack.codeplex.com/.
 
StrategyR Package for R: This package contains an R-based utility called deployR that analyzes an R analytic to captures its “signature” and persists it in a comment block at the beginning of the R script. This signature describes the number and nature of each input and output along with other information related to its execution so that Strategy can pass data to R, execute the analytic and deploy its results. This package is only required to prepare an R Script for execution by Strategy by capturing the function signature into the header block. Once the script has been prepared, this package is not required for executing the prepared script. This package can be installed into your R environment just like any other R package using the CRAN repository, accessible from http://www.r-project.org/ website. Click CRAN, choose a mirror and search "StrategyR" for the package name.
 
Following is a sample link: http://cran.r-project.org/web/packages/MicroStrategyR/index.html
 
 
4. Use deployR utility to create metrics expression
Assuming users already have their R script, DeployR Utility can add a description of user's Analytic's Signature to user's R Script so it can be deployed to Strategy. Follow below steps for high level guidance to use deploy R utility. For more help regarding R Integration Pack, refer to R Integration Pack User Guide available in http://rintegrationpack.codeplex.com/documentation.

  • Open R script in deployR utility.
ka04W00000148JNQAY_0EM440000002CnC.jpeg
  • Make necessary changes to all your variables.
  • Persist your signature to RScript.
ka04W00000148JNQAY_0EM440000002CnE.jpeg
  • Copy your Metric Expression and paste in Strategy Metric Editor.
ka04W00000148JNQAY_0EM440000002CnW.jpeg
ka04W00000148JNQAY_0EM440000002CnD.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

May 22, 2017

Last Updated:

May 22, 2017