Learn R Programming

translateSPSS2R (version 1.0.0)

xpssFilter: Creates a FILTER subset

Description

R implementation of the SPSS FILTER argument.

Usage

xpssFilter(x,variable = NULL, filtervalue = 1)

Arguments

x
a (non-empty) data.frame or input data of class "xpssFrame".
variable
atomic character with the name of the variable.
filtervalue
atomic character or atomic numeric which contains the filtervalue.

Value

Output is a subset of the actual dataset under the predetermined condition of the filtervalue.

Details

xpssFilter creates a subset of the actual dataset, without deleting the excluded variables, respectively without deleting the excluded values. After activating xpssFilter, only the subset will be used, the excluded data will be ignored for the following actions until xpssFilterOff terminates the filtering. As noted before those cases are not actually deleted and will be available after the filter is turned off. Important: All changes are used on the complete dataset, except for the function being an data exploring or data analyzing function
Type of Function Example Function
Dataset Usage Data Management
xpssSelectIf Uses thecomplete dataset
Data Modifing xpssRecode Uses the complete dataset
Data Exploring xpssDescriptives
Uses theworking dataset only Data Analyzing
xpssRegression Uses the working dataset only

See Also

Related Functions xpssDoIf xpssFilterOff xpssSample xpssSelectIf xpssTemporary

Examples

Run this code
data(fromXPSS)

fromXPSS <- xpssFilter(x=fromXPSS, variable = "V3", filtervalue=1)

xpssDescriptives(x=fromXPSS, variables = "V6")

xpssFilterOff(x=fromXPSS)

Run the code above in your browser using DataLab