spsspkg.Submit Function (R)
spsspkg.Submit(command text). Submits the command text to IBM® SPSS® Statistics for processing. The argument can be a quoted string or a character vector.
- The argument must resolve to one or more complete IBM SPSS Statistics commands. You can use \n to delimit commands within a single quoted string.
- If IBM SPSS Statistics is
not currently running (when driving IBM SPSS Statistics from R),
spsspkg.Submitwill start the IBM SPSS Statistics backend processor. - Submitted syntax for
MATRIX-END MATRIXandBEGIN DATA-END DATAblocks cannot be split acrossBEGIN PROGRAM R-END PROGRAMblocks. - The following commands are not supported by
Submitwhen driving IBM SPSS Statistics from R:OUTPUT EXPORT,OUTPUT OPENandOUTPUT SAVE.
Example
BEGIN PROGRAM R.
#Run a single command
spsspkg.Submit("DISPLAY NAMES.")
#Run two commands, specifying commands as a character vector
spsspkg.Submit(c("DISPLAY NAMES.", "SHOW $VARS."))
#Run two commands, specifying commands in a single string with \n to delimit the commands
spsspkg.Submit("DISPLAY NAMES.\nSHOW $VARS.")
END PROGRAM.