Difference between revisions of "Integrating with R"
(Created page with "[http://www.r-project.org R] is a data analysis environment created through the [http://www.gnu.org GNU Project]. This page provides a place for Analytica users to share tricks ...")
Revision as of 20:45, 19 July 2012
Calling R from an Analytica model
Running a batch job
You need to run a particular analysis using R code and libraries, possibly running on data from generated by your Analytica model, and then you'll need to read in the results of that R analysis into Analytica.
You'll need the Analytica Enterprise or better for this.
- Install the R Software for Windows (if you haven't already)
- Figure out how to perform the analysis of interest in R. Note down the list of commands you would issue in R.
- From your Analytica model, use WriteTextFile to write out the R commands that will need to be executed to a file.
- Use RunConsoleProcess to launch R.exe and run the analysis
- Use ReadTextFile to read the results
- Use FindInText, SplitText and ParseNumber to parse the results from R.
= Writing out the data and commands
Using an Analytica model from R
TBD: Would be done using ADE