Re: R in SPSS 16 - Graphical output

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: R in SPSS 16 - Graphical output

Michael-416
On Wed, 9 Dec 2009 15:36:53 -0700, Jon K Peck <[hidden email]> wrote:

>See below.
>Jon Peck
>SPSS, an IBM Company
>[hidden email]
>312-651-3435
>
>
>
>From:
>Michael <[hidden email]>
>To:
>[hidden email], [hidden email]
>Cc:
>Michael <[hidden email]>
>Date:
>12/09/2009 02:36 PM
>Subject:
>Re: R in SPSS 16 - Graphical output
>
>
>
>Hi Jon,
>
>I am trying to use simple R functions to explore my data from within SPSS
>16.
>I read that SPSS 16 cannot output graphics in the Viewer and therefore I
>need to export them to an external data file. I have however a hard time
>finding information on have to do this.
>
>>>>Later versions of SPSS do indeed include the graphics in the Viewer.  I
>don't have Version 16 installed on my current machine, but I think you
>could use the savePlot function in R to write the graphics to a file of
>whatever image type you want.
>
>Alternative you can modify set the R graphics driver or use dev.print.
>HTH,
>Jon
>
>For instance, if I use
>
>library(UsingR)
>print(simple.hist.and.boxplot(variable_name))
>(should output both an histogram and boxplot of the data)
>
>I get an output like this:
>
>$stats
>     [,1]
>[1,]   47
>[2,]   60
>[3,]   80
>[4,]   97
>[5,]  150
>
>$n
>[1] 28
>
>$conf
>        [,1]
>[1,] 68.9521
>[2,] 91.0479
>
>$out
>[1] 999 999 999
>
>$group
>[1] 1 1 1
>
>$names
>[1] "1"
>
>What is the correct procedure to use to make it work ?
>
>Regards,
>
>Michael
>
>
>

Hi Jon,

Thank you for your reply. I have difficulties to get SPSS 16 works with R.
Although your solution might work, I did not manage to get it. I always get
errors with the X device (screen output) when I call R from SPSS 16. I will
switch to the last version of SPSS which provide full support of R.

Regards,

Michael

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD