Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

Anchor
4.5.1 Using Sci2 with R
4.5.1 Using Sci2 with R
4.5.1 Using Sci2 with R

R is an environment and language for statistical analysis and modeling. R also enables graphical visualization. It is freely available under the GNU General Public Licenses. For more information on R and to download click here. You can use Sci to to create an R instance and send tables to R for analysis as well as extract tables from R.

Create an R Instance

Once R has been downloaded, an instance will need to be generated in order to import and export tables using Sci2. Run 'R > Create an R Instance' to create an R instance. The R executable directory will need to be selected (on a Windows machine it will most likely be located here: C:\Users\username\Programs\R-2.14.1\bin\i386):

The R instance will then display in the console as follows:

Send  Table to R

Tables in csv format cab be sent from Sci2 to the R instance for analysis and visualization. First, load a csv file in Sci2. Select both the loaded csv file and the R instance in the data manager (in Windows, hold the ctrl key as you click with the mouse). Run'R > Send Table to R' and choose name for the imported table:

R can now be opened by running 'R > Run Rgui' and the table is now available in the R environment using the variable name specified as a parameter in the "Import Table Into R". You can call the table in the R instance:

Get a Table from R

To get a table that has been imported to R run 'R > Get table from R' and select the table from the drop-down menu:

 The table will then show up in the data manager.