Learn R Programming

translateSPSS2R (version 1.0.0)

xpssFrame: Creates a xpssFrame Object

Description

xpssFrame creates a dataset as an xpssFrame object from a local file.

Usage

xpssFrame(x, ...)

Arguments

x
as character string with the name of the file.
...
Arguments to pass on read.spss() from foreign.

Details

x the input data should be of the format .sav.

The SPSS dataset contains the following attributes: names, codepage, row.names, FILTER, TEMPORAY, SPLIT_FILE, DO_IF, SELECT_IF, WEIGHTS, class

Attribute Type
Contain names
atomic character or character vector Name of the variable in the dataset
codepage atomic numeric ANSI code, which describe the encoding
row.names atomic numeric or numeric vector
row ID's FILTER
atomic logical or condition Filtercondition or FALSE if xpssFilter is off
TEMPORARY atomic logical Logical statement if xpssTemporary is on or off
SPLIT_FILE atomic logical
Split-File condition or FALSE if xpssSplitFile is off DO_IF
atomic logical or condition Do-If-condition or FALSE if xpssDoIf is off
SELECT_IF atomic logical or condition Select-If-condition or FALSE if xpssSelectIf is off
WEIGHTS atomic character
* will be implemented in a following update class
atomic character or character atomic or vector of names of classes the datasets inherits from.

Variable attributes are stored in the variable itself. A variable can have the following attributes: defined.MIS, MIS, value.labels, variable.label, varname

Attribute Type
Contain defined.MIS
Atomic numerics or atomic characters, respectively a numeric vector or character vector Values which specify missing values
MIS list with user-defined missings POS contain the position of the user-defined missing, VAL the value of the user defined-missing
value.labels Named numeric or named character
Value and label for a specific variable variable.label
Atomic character Label of the variable
varname Atomic character Name of the variable in the datasheet

See Also

read.spss as.xpssFrame

Examples

Run this code
## Not run: 
# data <- xpssFrame(x="Testdata_1.sav")
# ## End(Not run)

Run the code above in your browser using DataLab