xpssSelectIf: Creates a subset of cases

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/xpssSelectIf.R

Description

R Implementation of the SPSS SELECT IF argument. xpssSelectIf permanently selects cases for analysis based on logical conditions.

Usage

1
xpssSelectIf(x, cond = NULL)

Arguments

x

a (non-empty) data.frame or input data of class "xpssFrame".

cond

logical expression for subsetting the data.

Details

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.

Value

Returns a subset of the actual dataset under the condition of the logical expression.

Author(s)

Andreas Wygrabek

See Also

Related Functions xpssDoIf, xpssFilter, xpssTemporary

Examples

1
2
3
4
5
data(fromXPSS)

temp <- xpssSelectIf(x=fromXPSS, cond = "V3 == 1")

temp <- xpssSelectIf(x=fromXPSS, cond="V4 == 1 & V7_1 < 200")

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.