MicroStrategy ONE
The R Integration Pack is no longer supported as of December 2024.
How to Create Images in R to Add to MicroStrategy Documents
You can create images using R scripts, which can be included in MicroStrategy documents to display the result of an analysis, illustrate a trend, and so on. The image in the document is updated whenever the R script used to create the image is run again.
You can also create dynamic images, which allow different images to be displayed, based on an attribute or metric. For example, a document is paged by Region. You can display a graph made in R for that particular region in the document.
Creating Images in R to Use in MicroStrategy
- Define the R script's working directory to the location where images for MicroStrategy are stored. All images must be saved in a location accessible by the MicroStrategy platform, which can be defined by your system administrator.
-
Within the R script, include code to create an image in R and save the image in the working directory. For example, the plot command can be used to create images of statistical graphs. Refer to your third-party R documentation for information on how to create an R image.
If you are creating dynamic images, save all of the images in the same directory. Give each image the name of its corresponding attribute element or metric value.
If you created an image you want to display when the value of the Region attribute is Northeast, you would name the image Northeast. If you have multiple dynamic images you want to display for an attribute element or metric value, ensure that the correct image is used by giving each dynamic image a different name that contains the attribute element or metric value. For information on how to name dynamic images, see the Document Creation Help.