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

KB439096: R metric shows no results in document


Jose Procs

Manager, Cloud Support • MicroStrategy


This article will provide troubleshooting steps to resolve the issue of an R metric not displaying any results

SYMPTOM:
 
When a user adds a R script metric to a document in Strategy, after installing R Integration pack and reviewing the documentation, the metric will still not show any information.
 

ka04W000000UmdvQAC_0EM44000000Q8dK.png

 
After checking DSSErrors.log, the following error can be seen:
 


[SERVER:CastorServer][PID:2264][THR:4420][Analytical Services][Error][0x80042425] Analytical Engine Error. Apply function failed. Internal error.
[SERVER:CastorServer][PID:2264][THR:4420][Analytical Services][Error][0x80002434] Analytical Engine plug-in function error: [CRFPCommonNNGEN::ExRScript: R script execution failed:  package or namespace load failed for 'forecast']

 
RScriptErrors.log will show:
 

CRFPCommonNNGEN::ExRScript: R script execution failed:  package or namespace load failed for 'forecast'

 
CAUSE:
 
The error message states that there is a package that is failing to load, in this case, the package is 'forecast'.
Ideally, this should be installed automatically when installing the R Integration Pack.
 
To confirm if there is an issue with this package, the following command can be executed in the R console:
 
> library(forecast)
 
This will present an error:
 

ka04W000000UmdvQAC_0EM44000000Q8cl.png

 
Error in loadNamespace (i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
                there is no package called 'rlang'
Error: package or namespace load failed for 'forecast'
 
This error shows that the package 'forecast' has some dependencies that have not been installed, and because of that it is failing to load.
 
 
ACTION:
 
To install the missing dependencies, the following command can be executed:
 

ka04W000000UmdvQAC_0EM44000000Q8cq.png

 
> install.packages('rlang')
 
After installing the missing package, the command library(forecast) can be executed again to see if there are any other missing dependencies.
For this test, there was another dependency missing, 'quantmod'.
The procedure to install that is the same as before:
 

ka04W000000UmdvQAC_0EM44000000Q8cv.png

 
> install.packages('quantmod')
 
When all missing dependencies have been installed, running the library(forecast) command should issue no message, which would indicate that it has been loaded correctly.
 
To continue, the user can run the following command to bring up the R GUI Console:
 

ka04W000000UmdvQAC_0EM44000000Q8d0.png

 
> deployR()
 
And make the desired adjustments to the script, which can then be moved to Strategy.
This time the metric will show values as expected.
  KB439096


Comment

0 comments

Details

Knowledge Article

Published:

November 28, 2017

Last Updated:

September 1, 2020