Description Usage Arguments Details
This function inputs SPSS syntax and returns comparable R syntax.
1 2 |
file |
Path of text file that has SPSS syntax |
dplyr |
A value of TRUE uses dplyr syntax (default), a value of FALSE uses data.table syntax |
writeRscript |
TRUE or FALSE variable to write R script. By default this is FALSE. |
filePath |
Path to save R script. Default is NULL which saves to working directory as 'rScript.r'. |
nosave |
A value of FALSE processes the save commands (default), a value of TRUE continues processing within R, overriding default x object. Extreme care with this feature as get commands will be ignored. |
The only required input for this function is a text file that contains SPSS syntax. The SPSS syntax can be the .sps syntax file that SPSS saves as or can be copied into another text file format. The function readLines is used to read in the file line by line.
A single column matrix is used to return the R code. If a R command is long it does not wrap the code and so copy and pasting may be needed. As an alternative, the R syntax can be saved to an R script file. No column names or row names are printed when saving this script file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.