spss.compute.max: Generate SPSS 'COMPUTE' syntax to compute the MAX() of two...

Description Usage Arguments Examples

Description

Generate SPSS 'COMPUTE' syntax to compute the MAX() of two (sets of) variables.

Usage

1
spss.compute.max(var1, var2, append = "new.", ...)

Arguments

var1

the first argument for MAX(). Used for the naming of the output variable(s).

var2

the second argument for MAX().

append

specifies the text that should be appended to the name(s) of the variable(s) in var1 to create the output variable(s).

...

any additional arguments that can be passed to functions spss.format.max and spss.format.compute

Examples

1
2
spss.compute.max(c("dob", "income"), c("dob_f", "income_f"), append = "total.")
spss.compute.max(c("dob", "income"), c("dob_f", "income_f"))

Example output

[1] "COMPUTE total.dob = MAX(dob,dob_f)."         
[2] "COMPUTE total.income = MAX(income,income_f)."
[1] "COMPUTE new.dob = MAX(dob,dob_f)."         
[2] "COMPUTE new.income = MAX(income,income_f)."

syntaxr documentation built on May 2, 2019, 3:45 a.m.