Due to the need for market data analysis within the company, the introduction of R statistical Tools is required and integrated into the reporting tools. For the introduction of R, everyone please Baidu, of course, it is best to see the official instructions https://www.r-project.org/
The following is a brief introduction to the installation of the R tool and the integrated use of the data analysis tool Spotfire.
1. Installing the R environment
This is relatively simple, we go to the official website to download a http://cran.us.r-project.org/. According to your operating system to choose the correct version, I am using the version of Windows, the version when writing this article is 3.2.3 Http://cran.us.r-project.org/bin/windows/base/R-3.2.3-win.exe
2. OK go directly to the Bin directory (native directory "C:\Program Files\r\r-3.2.2\bin\x64\rgui.exe") Cloud Heart Rgui.exe. Out of Control GUI program, of course, the same directory has a R.exe console program, I use this version of the time will often stuck can not input, so give up the use of, anyway, how to point resource consumption
Rgui Run interface
3. Here the main introduction of deployment, so do not write more content, interested can look at this example http://syntelli.com/tip-of-the-week/use-r-scripts-tibco-spotfire-terr/# Prettyphoto, English, no time to translate it, look at the interface bar. The country may not be able to use the U.S. Census data, this version of the agent under the Jason file (Census.zip), for reference. It is worth mentioning that the article mentioned in the Jason Library has been replaced by Rjson, you can directly in the Rgui using Install.packages ("Rjson") to install the library.
To import data, you can use the following statement:
Library ("Rjson")
Json_file <-"{Path}/data.jason"
Data <-Data.frame (
Fromjson (Paste (ReadLines (json_file), collapse= ""))
, stringsasfactors = FALSE
)
Data
The results appear as follows:
For how to inherit to Spotfire, the next article explains.
R Statistics tools Deployment and use