1.6 Loading Data from SPSS/SAS/Stata Files
You want to load data from a SPSS file, or from other programs like SAS or Stata.
The haven package has the function
read_sav() for reading SPSS files. To load data from an SPSS file:
The haven package also includes functions to read from other formats:
An alternative to haven is the foreign package. It also supports SPSS and Stata files, but it is not as up-to-date as the functions from haven. For example, it only supports Stata files up to version 12, while haven supports up to version 14 (the current version as of this writing).
The foreign package does support some other formats, including:
read.octave(): Octave and MATLAB
read.xport(): SAS XPORT
1.6.4 See Also
ls("package:foreign") for a full list of functions in the foreign package.