|
Provided we have installed R, can we run R syntax in the "SPSS Syntax Editor" and then produce outputs in the "SPSS ourput viewer"?
Show off your style with new cool skins. Try the all-new Yahoo! Messenger 9.0 today! |
|
Assuming version
16 or later, you need to install the R plug-in from Developer Central. Then
your R syntax can be run in the syntax window between BEGIN PROGRAM R. and END PROGRAM R. The output
automatically appears in the SPSS Viewer with two cautions. 1) In version
16, R graphics are written to files and don't appear in the Viewer. Version
17 integrates the graphics directly. 2) When using R interactively, expression
output appears in your console windows, e.g., summary(dta) displays the
summary statistics for a data frame, dta. In non-interactive mode, which
is what you are in when running BEGIN PROGRAM, you need to enclose the
expression in a print function for it to display, e.g., print(summary(dta)) The
documentation for the apis to communicate between SPSS and R is installed along
with the plug-in, and there are examples in the Data Management book linked on
Developer Central (www.spss.com/devcentral). You might also
go through the PowerPoint article on Developer Central, "Programmability
in SPSS Statistics 17", which you will find on the front page of the site.
It includes a detailed example of using the R Quantreg package in SPSS as
an extension command. There is also a download in the R section on creating
an SPSS dialog box that generates an R program directly. Look for Rboxplot
– Creating an R Program from a Dialog. This has a simple dialog box
that generates code for an R boxplot along with an article that explains what
is happening. HTH, Jon Peck From: SPSSX(r)
Discussion [mailto:[hidden email]] On
Behalf Of Eins Bernardo Provided we have installed R, can we run R syntax in the "SPSS
Syntax Editor" and then produce outputs in the "SPSS ourput
viewer"? Show off your style with new cool skins. |
Have a new Yahoo! Mail account? Kick start your journey by importing all your contacts! |
| Free forum by Nabble | Edit this page |
