Description Usage Arguments Details Value Author(s) See Also Examples
R Implementation of the SPSS SELECT IF
argument. xpssSelectIf permanently selects cases for analysis based on logical conditions.
1 | xpssSelectIf(x, cond = NULL)
|
x |
a (non-empty) data.frame or input data of class |
cond |
logical expression for subsetting the data. |
The condition to select cases are specified in a logical expression. These logical expressions can contain relational operators, logical operators and arithmetic operations.
NOTE: For temporary case selection, specify xpssTemporary
before SELECT IF
.
Returns a subset of the actual dataset under the condition of the logical expression.
Andreas Wygrabek
Related Functions xpssDoIf
, xpssFilter
, xpssTemporary
1 2 3 4 5 | data(fromXPSS)
temp <- xpssSelectIf(x=fromXPSS, cond = "V3 == 1")
temp <- xpssSelectIf(x=fromXPSS, cond="V4 == 1 & V7_1 < 200")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.