spss.format.compute {syntaxr} | R Documentation |
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
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)")
[Package syntaxr version 0.8.0 Index]