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

KB46683: How to install R, the R integration pack or MicroStrategyR (that includes the deployR() tool) on a machine that doesn’t have access to the internet


Community Admin

• Strategy


This article describes how to install the R integration pack on a machine without internet access.

Section 1: Installing R and the R Script Functions on a machine without internet access:
R and the RScripts functions need to be installed where the analytics execute. Perform the steps below on the Strategy Intelligence Server machine for users of: Strategy Web, Strategy Office, Strategy Developer, and Strategy Mobile; and on the machine where the Strategy Developer is, for users of Derived Metrics in 3-tier, 2-tier and Strategy Analytics Desktop. These steps are required for using R and the R integration pack with Strategy:
 
1. Install R: The R installer is found here: http://cran.rstudio.com/. The user needs to download the R environment using a machine that has access to the internet, and move the installer file to the machine without internet (target machine), the user then needs to install the R environment on the target machine.
2. Install R Script Functions: The latest release of the pack is found under: http://rintegrationpack.codeplex.com/releases/. Download the installer that matches the operating system of the target machine using a machine with internet access. Move the R integration pack installer to the target machine, and install it. Be sure to complete post-installation instructions to install the RScripts functions in the metadata of any required projects (found under the R Integration Pack User Guide - http://rintegrationpack.codeplex.com/documentation). After moving the installer file to the target machine without internet access, windows and Unix/Linux steps vary, see below:
a.  For installation on Windows, the installer will be named RIntegrationPack.msi. Once downloaded, execute the installer, following the instructions provided by the wizard. The default installation location is C:\Program Files\R Integration Pack (this location can be altered via the wizard).
b. For installation of Unix/Linux, the installer is named RIntegrationPack_<OS>.tar.gz (where <OS> may be SunOS, AIX or Linux). Follow these instructions to install the RScript functions:
·         Unzip the file (e.g. gunzip RIntegrationPack<OS>.tar.gz_).
·         Extract the installation files (e.g. tar –xvf RIntegration<OS>.tar_).
·         Execute the installation wizard, using the command setup.sh.
·         Follow the instructions provided by the wizard, including the specification of where R has been installed on the system. The default installation location is one of the following (this location can be altered via the wizard): /var/opt/RIntegrationPack (for root user) or $HOME/RIntegrationPack (for non-root user)
 
Section 2: Installing the StrategyR package on a machine without internet access:
For an R Script to be used by Strategy, the analytics’ “signature” needs to be captured into a comment block that’s added to the top of the R Script. This signature defines the nature of the analytic’s inputs and outputs along with other information required for Strategy to properly pass data to and from R when executing the script. Once the analytic signature is captured into the comment block at the top of the R script, the R Script can be deployed to any Strategy system that has R and the R Scripts functions installed (see above section). Strategy provides a utility for the R script developer to capture the analytic’s signature called “deployR()” which is part of the “StrategyR” package. The StrategyR package is available from CRAN like any other R package.  Note that the StrategyR package and it’s deployR() utility run only in the R environment, because it’s only used by R script developer to capture the analytic’s signature. Therefore, the “target” machine is the R script developer machine, which can be a different machine that the ones listed in the section above.
If any of the R package files is missing, the installation will try to connect to the internet, resulting in an installation error. To prevent this, use the command in the OSSdownloader readme to check if all required files are available in the downloads folder. 
NOTE:  The StrategyR package is NOT required to execute R analytics on the Strategy Intelligence Server, Strategy Developer or Strategy Analytics Desktop machines. 
NOTE:  The StrategyR package must be used on a Windows system that already has R installed.
 
Step 1:  From a machine with internet access, download the following installers:
a)    Packages from CRAN: Using http://cran.rstudio.com/web/packages/available_packages_by_name.html by finding the package, clicking on its name to get to it’s page and, under “downloads” save the latest version of the appropriate installation file for your R script developer’s machine.  This would be the Windows Binary (zip file).
·   RGtk2 package
·   gWidgetsRGtk2 package
·   gWidgets package
·   StrategyR package
·   Any other packages the R Script Developer requires (along with any dependencies those packages may have)
·   From the R console on a system with the dependent package installed, run: installed.packages(.Library, fields=c("Depends")).
·   Find each required package and note any dependences and their dependencies, including the order (which packages depend on which other packages)
·   Download appropriate installer(s) for the noted packages as above
b)   GTK+ Bundle:  download the latest version
·   win64: from http://ftp.acc.umu.se/pub/gnome/binaries/win64/gtk+/ (e.g., http://ftp.acc.umu.se/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.0-20101016_win64.zip )
·   win32: from http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/ (e.g., http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip)
 
Step 2:  Copy the files from Step 1 to the R script developer’s machine
Step 3:  Install GTK+
a)   Extract GTK+-bundle (win64) to a folder named gtk+_win64
b)   Extract GTK+-bundle (win32) to a folder named gtk+_win32
c)   RGtk2 package. Install it using the R Console: install.packages("drive://path//RGtkx_x.xx.xx.zip", repos=NULL)
d)   Go to the RGtk2 folder (typically at C:\Program Files\R\R-x.x.x\library\RGtk2)
·   Create a new sub-folder called gtk
·   Copy and paste the gtk+_win64 folder to the gtk folder and rename the folder: x64.
·   Copy and paste the gtk+_win32 folder to the gtk folder and rename the folder: i386
 
Step 4:  Install in the following order from the R Console:
    
e)   gWidgetsRGtk2 package. Install it using the R Console: install.packages("drive://path//gWidgetsRGtkx_x.x-xx.zip", repos=NULL)
f)    gWidgets package. Install it using the R Console: install.packages("drive://path//gWidgets_x.x-xx.zip", repos=NULL)
g)   StrategyR package. Install it using the R Console: install.packages("drive://path//StrategyR_x.x-x.zip", repos=NULL)
h)   Install any other required packages and all their dependencies, in the dependency order, using the R console: install.packages("drive://path//package.name", repos=NULL)


Comment

0 comments

Details

Knowledge Article

Published:

April 11, 2017

Last Updated:

April 11, 2017