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

KB232741: The R function sink() does not write output to a file in MicroStrategy Intelligence Server 9.4.1.


Community Admin

• Strategy


In R, the sink() function writes output to a specified file. When leveraging this function in the MicroStrategy R integration, however, output will not be written.

SYMPTOM:
In R, the sink() function writes output to a specified file. When leveraging this function in the Strategy R integration, however, output will not be written.
 
STEPS TO REPRODUCE:

  1. Suppose that a user wishes to perform a paired t-test with the two metric values and store the test result to a file.
ka04W000000OeaNQAS_0EM4400000029HQ.jpeg

 

  1. Define an R script as follows and add an appropriate R metric to the above report


# assign the value of Phobia Score 1 and 2 to var1 and var2 respectively
var1 <- c(rMetric1)
var2 <- c(rMetric2)

# perform a paired t-test and write the output to a file
sink("C:/Users/Administrator/Desktop/R/T Test/Output/output.txt", append=FALSE)
t.test(var1, var2, paired=TRUE)
sink()

# assign the value of var1 to a variable, which will be sent back to MSTR
output <- var1

# save as RDATA for further investigation
save.image("C:/Users/Administrator/Desktop/R/T Test/t-test.RData")

  

  1. Before the execution, the output folder is empty
ka04W000000OeaNQAS_0EM4400000029HP.jpeg

 
 

  1. After running the report with the R metric, output.txt is generated but the content is empty.
ka04W000000OeaNQAS_0EM4400000029HN.jpeg

 
 

  1. Further investigation: after loading “t-test.Rata” and perform the t-test in the same way in the R console, test result is written to output.txt as expected.
ka04W000000OeaNQAS_0EM4400000029HO.jpeg

 
 
CAUSE:
This is a known issue in Strategy Intelligence Server 9.4.1.
 
ACTION:
Currently this issue is still being reviewed for feasibility by our Technology team and it is not scoped for any upcoming scheduled Strategy release.
 
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:

June 9, 2017

Last Updated:

June 9, 2017