translate2R, anyone?

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

translate2R, anyone?

Albert-Jan Roskam-2
Hi,

I was wondering who has used translate2R, which converts SPSS to R code. What are your experiences?http://www.r-bloggers.com/translate2r-migrate-spss-scripts-to-r-at-the-push-of-a-button/

Regards,
Albert-Jan

=====================
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: translate2R, anyone?

Jignesh Sutar
I pasted in some very basic/common commands as a test and it failed to any conversion to R code...I would have expected perhaps the functionality for basic commands to work but anticipateglitches when more advance syntax is entered (DEFINE/MATIX ect)...Good idea and could be a good tool for those wanting to learn R if having SPSS experience but not R.


compute test=1.
sort cases by v1.
if gender=1 dummygender=1.
frequencies v1.
crosstabs v1 by v2.



On 31 October 2014 18:59, Albert-Jan Roskam <[hidden email]> wrote:
Hi,

I was wondering who has used translate2R, which converts SPSS to R code. What are your experiences?http://www.r-bloggers.com/translate2r-migrate-spss-scripts-to-r-at-the-push-of-a-button/

Regards,
Albert-Jan

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

===================== 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: translate2R, anyone?

Albert-Jan Roskam-2
Hi Jignesh,

Wow, even crosstabs poses problems. I would have expected a translation into xtabs() or tables(). The list of supported commands is fairly short: https://service.eoda.de/translater/images/Available_Commands.pdf

Also, I noticed that the Get File (xpss) is implemented using the foreign::read.spss, instead of the newer and better memisc::spss.system.file function. With the latter function it is possible to subset data BEFORE it is read into memory. It could be nicely mapped to the KEEP and DROP subcommands.


Also, the generated code might look a little strange:

* a comment.
compute abc = 1.
if ( abc eq 10 ) cde = 1.

... is translated into

# a comment
trdat$abc <- 1
xpssIf(trdat, cond = "abc == 10", varname = "cde", fill = 1)

... while you normally write

trdat$abc <- 1

trdat[trdat$abc == 10, "cde"] <- 1


Still, it is an interesting initiative.


Regards,
Albert-Jan




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a

fresh water system, and public health, what have the Romans ever done for us?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




>________________________________
> From: Jignesh Sutar <[hidden email]>
>To: [hidden email]
>Sent: Friday, October 31, 2014 9:27 PM
>Subject: Re: [SPSSX-L] translate2R, anyone?
>
>
>
>I pasted in some very basic/common commands as a test and it failed to any conversion to R code...I would have expected perhaps the functionality for basic commands to work but anticipateglitches when more advance syntax is entered (DEFINE/MATIX ect)...Good idea and could be a good tool for those wanting to learn R if having SPSS experience but not R.
>
>
>
>
>compute test=1.
>sort cases by v1.
>if gender=1 dummygender=1.
>frequencies v1.
>crosstabs v1 by v2.
>
>
>
>
>
>
>
>
>
>On 31 October 2014 18:59, Albert-Jan Roskam <[hidden email]> wrote:
>
>Hi,
>>
>>I was wondering who has used translate2R, which converts SPSS to R code. What are your experiences?http://www.r-bloggers.com/translate2r-migrate-spss-scripts-to-r-at-the-push-of-a-button/
>>
>>Regards,
>>Albert-Jan
>>
>>=====================
>>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
>>
>
=====================
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
>
>

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