read.spss {foreign}R Documentation

Read an SPSS data file

Description

read.spss reads a file stored by the SPSS save and export commands and returns a list.

Usage

read.spss(file, use.value.labels=TRUE, to.data.frame=FALSE)

Arguments

file character variable with the name of the file to read.
use.value.labels Convert variables with value labels into R factors with those levels?
to.data.frame return a data frame?

Details

This uses modified code from the PSPP project for reading the SPSS formats.

Value

A list (or data frame) with one component for each variable in the saved data set.

Author(s)

Saikat DebRoy

Examples


read.spss("datafile")
read.spss("datafile",use.value.labels=FALSE)


[Package Contents]