R scripts in STATISTICA 8

gianmarco

TS Contributor
#1
Hi,

I am wondering if R-scripts can be executed in STATISTICA 8 enviroment.

I guess this is possible in the latest version of the program (v. 9), but I got the v. 8.3.

Any suggestion?

Thanks
Gm
 

JenB

New Member
#2
R-scripts can be run in STATISTICA v. 8.3, but I think you'll need a previous version of R, such as R-2.7.1-win32.exe.
 

gianmarco

TS Contributor
#3
Hi!
I am faced again with the need to run a R script in Statistica 8.3.

I see that the R script I downloaded (http://www.public.asu.edu/~mpeeple/BR.html) can be read by Statistica, and it is open in a window displaying the code.
Now, I am wondering how I can put it on work (e.g.: how can I feed the data in? Do I need to install R along with Statistica?). I have no previous experience with R.

Thanks for any help provided
Bests
Gm
 

JenB

New Member
#4
Yes, in order to run R scripts, you'll need to first install R.

The current version of R (as of June 2011) is R 2.13.0. If you are using an older version of STATISTICA, you'll need an older version of R. For example STATISTICA 8.3 works with R 2.7.1, which can be found at http://cran.r-project.org/bin/windows/base/old/2.7.1/

R is a free, open-source language and environment within which statistical techniques are implemented (see www.r-project.org/about.html). When you install R, a core set of packages (i.e., libraries) are included. R capabilities are extended through user-created packages, which allow specialized statistical techniques, graphs, and more. A complete list of packages can be found at http://cran.r-project.org/web/packages/

The script you mentioned starts with the following line:
library(statnet) # initialize necessary library

This means that you will need to download the statnet package and all the packages it depends on (e.g., network, ergm, latentnet, etc.), plus all the packages that these depend on.

Once this is done, here are the steps:
  1. Open R, create a new script, and save it
  2. Rename the saved file with an ".R" file extension
  3. Double-click the file to open it in STATISTICA
  4. Click the Run Macro button (it looks like a blue triangle)

Have fun!
Jen
 

gianmarco

TS Contributor
#5
Hi!
Thanks a lot for coming back to my post, and thanks for the very helpfull information.
I will follow your guidelines, and try to run that script.

In case of any further issues, I will write back to you here (if you do not mind).


Best Regards,
Gm