Help for a Really Stupid Question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help for a Really Stupid Question

Mike
Okay, I have been putting off learning R for various reasons but
now I have a really stupid question:
 
How do I import an R data file *.rda into SPSS?
 
I have tried to locate info on the web but I can't seem to find
anything that is relatively simple and direct (and doesn't involve
Modeler).
 
So, can someone help a brother out? TIA.
 
-Mike Palij
New York University
 
===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Help for a Really Stupid Question

Jon Peck
Statistics does not have a native R reader, but you can use the STATS GET R extension command.  Since R workspaces can have a lot of things that don't map to SPSS datasets, you usually start by running this to find out what R data frames or other series that could be made into a data frame are present.  Then run it again and specify the objects you want.

Once you have installed this extension, which of course requires R and the R Essentials, it will appear on the File menu.

On Sat, Oct 21, 2017 at 2:45 PM Michael Palij <[hidden email]> wrote:
Okay, I have been putting off learning R for various reasons but
now I have a really stupid question:
 
How do I import an R data file *.rda into SPSS?
 
I have tried to locate info on the web but I can't seem to find
anything that is relatively simple and direct (and doesn't involve
Modeler).
 
So, can someone help a brother out? TIA.
 
-Mike Palij
New York University
 
===================== 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
--
Jon K Peck
[hidden email]

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Help for a Really Stupid Question

Jon Peck
File has been read with STATS GET R without trouble.

On Sat, Oct 21, 2017 at 4:41 PM, Mario Giesel <[hidden email]> wrote:
Michael, another possibility is to solve the task from within R. This writes the data into a text file and the SPSS syntax job into an sps file:

library(foreign)
write.foreign(mydata, "c:/mydata.txt", "c:/mydata.sps",   package="SPSS")

Good luck!

Mario Giesel
Munich, Germany


Am Samstag, 21. Oktober 2017, 22:52:24 MESZ hat Jon Peck <[hidden email]> Folgendes geschrieben:


Statistics does not have a native R reader, but you can use the STATS GET R extension command.  Since R workspaces can have a lot of things that don't map to SPSS datasets, you usually start by running this to find out what R data frames or other series that could be made into a data frame are present.  Then run it again and specify the objects you want.

Once you have installed this extension, which of course requires R and the R Essentials, it will appear on the File menu.

On Sat, Oct 21, 2017 at 2:45 PM Michael Palij <[hidden email]> wrote:
Okay, I have been putting off learning R for various reasons but
now I have a really stupid question:
 
How do I import an R data file *.rda into SPSS?
 
I have tried to locate info on the web but I can't seem to find
anything that is relatively simple and direct (and doesn't involve
Modeler).
 
So, can someone help a brother out? TIA.
 
-Mike Palij
New York University
 
===================== 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
--
Jon K Peck
[hidden email]

===================== 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



--
Jon K Peck
[hidden email]

===================== 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