spsspkg.processcmd Function (R)

spsspkg.processcmd(oobj,myArgs,f,excludedargs). Parses the values passed to the Run function associated with an extension command, and executes the implementation function.

  • The argument oobj is a value returned by the Syntax function. It contains all of the information needed to parse the values passed to the Run function associated with an extension command.
  • The argument myArgs should be specified as:

    myArgs = args[[2]]

    where args is the argument passed to the Run function. myArgs contains the run-time values of the keywords associated with the extension command.

  • The argument f is the name of a function that implements the extension command.
  • The argument excludedargs is an optional list of arguments to be ignored when checking for arguments required by the implementation function f.

Note: The spsspkg.processcmd function is used in conjunction with the implementation code for an extension command implemented in R. It is not for use within a BEGIN PROGRAM R-END PROGRAM block. Specifically, it is for use in the Run function that implements the extension command.

Information on creating extension commands is available from the following sources:

  • The article "Writing IBM® SPSS® Statistics Extension Commands", available from the IBM SPSS Predictive Analytics community at https://www.ibm.com/community/spss-statistics .
  • The chapter on Extension Commands in Programming and Data Management for IBM SPSS Statistics , which is also available from the IBM SPSS Predictive Analytics community.
  • A tutorial on creating extension commands for R is available from "Working with R" in the Help system.