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

KB201798: How to install R Integration Pack on Linux in MicroStrategy 9.x and newer.


Community Admin

• Strategy


The following knowledge base article explains how to install R Integration Pack on MicroStrategy 9.x and newer running on Linux operating systems.

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, the user requires Strategy 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.

 
INSTALLING THE R INTEGRATION PACK ON LINUX

  • Download R from http://cran.rstudio.com/. A link to a .tar.gz file is available on the homepage to the latest release.
  • Unpack the file, and from the root directory type "./configure --enable-R-shlib". This will configure everything needed to make R(including the shared library Strategy binds to) and will confirm that the necessary dependents are available. When using a non-gui environment, the user will need to add the flag --with-x=no to force the configuration to not check for an X Windows system or the user will get the following error.

     
    
    configure: error: --with-x=yes (default) and X11 headers/libs are not available

  • Once this is done, the user will receive a message confirming that R is now configured for (the user's kernel) as well as the compilers that will be used to make R as shown below.

ka04W000000OfhHQAS_0EM4400000029LT.jpeg
  • From within the same directory as the previous step, type "make". This will begin building R from source. This process may take a long time.
  • R is now ready to be ran from the R-<version>/bin folder. If the user wants to install it, they must type make install which will install R to the default location (usually /usr/local). The user can type which R to determine the default R location. Typing R will open up the console as shown below.

ka04W000000OfhHQAS_0EM4400000029LY.jpeg
  • Download the R Integration Pack Linux installer from http://rintegrationpack.codeplex.com/releases/view/630028
  • Install R by running setup.sh. This requires a Strategy installation as well as R on the system to proceed. If the user is installing from the command line, execute the setup with the -console flag

 Note: At this point, if it is not necessary to build the Rscript functions on the Intelligence Server machine (Linux), R is ready to be used and deployR() can be used to build the metrics from a client machine. If it is necessary to build the Rscript functions on the Intelligence Server machine (Linux), follow the steps below.

  1. Open up R and type install.packages("StrategyR"). The user will be prompted to select a CRAN mirror as shown below.



    This will begin installing StrategyR packages as well as the following dependencies(Note that GTK(http://www.gtk.org/) is required for these packages, it can be installed from that site or default distribution for the OS (IH: RHN).

    RGtk2
    gWidgets
    gWidgetsRGtk2
     
  2. At this point, R, StrategyR, and the RIntegration pack are installed. In order to use deployR, type


library(StrategyR)

and then

deployR()

 
The StrategyR library must be loaded in each new console session to launch deployR. For further information using R with Strategy, consult the "Deploying R analytics in Strategy" section in the R Integration Pack User Guide. 
 
Third Party Software Installation:
WARNING:
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.


Comment

0 comments

Details

Knowledge Article

Published:

May 16, 2017

Last Updated:

August 14, 2017