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.Submit
will start the IBM SPSS Statistics backend processor. - Submitted syntax for
MATRIX-END MATRIX
andBEGIN DATA-END DATA
blocks cannot be split acrossBEGIN PROGRAM R-END PROGRAM
blocks. - The following commands are not supported by
Submit
when driving IBM SPSS Statistics from R:OUTPUT EXPORT
,OUTPUT OPEN
andOUTPUT 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.