Learn R Programming

syntaxr (version 0.8.0)

spss.format.compute: Generate SPSS 'COMPUTE' syntax to carry out an operation on two (sets of) variables.

Description

Generate SPSS 'COMPUTE' syntax to carry out an operation on two (sets of) variables.

Usage

spss.format.compute(output, operation)

Arguments

output

specifies the name(s) of the output variable(s) of COMPUTE().

operation

specifies the computational operation to be carried out.

Examples

Run this code
# NOT RUN {
spss.format.compute("new.var", "MAX(var1,var2)")
spss.format.compute(c("dob", "comments"), c("MAX(dob,dob_f)", "CONCAT(comments,comments_f)"))
spss.format.compute("string.var", "CONCAT(string1,string2)")
# }

Run the code above in your browser using DataLab