Learn R Programming

⚠️There's a newer version (0.8-91) of this package.Take me there.

foreign (version 0.5-6)

Read data stored by Minitab, S, SAS, SPSS, Stata, ...

Description

Functions for reading and writing data stored by statistical packages such as Minitab, S, SAS, SPSS, Stata, ...

Copy Link

Version

Install

install.packages('foreign')

Monthly Downloads

60,085

Version

0.5-6

License

GPL version 2 or later

Maintainer

R-core R-core@R-project.org

Last Published

January 29th, 2026

Functions in foreign (0.5-6)

write.dta

Write files in Stata binary format
S3 read functions

Read an S3 Binary File
read.dta

Read Stata binary files
read.spss

Read an SPSS data file
read.epiinfo

Read Epi Info data files
lookup.xport

Lookup information on a SAS XPORT format library
read.mtp

Read a Minitab Portable Worksheet
read.xport

Read a SAS XPORT format library
read.ssd

obtain a data frame from a SAS permanent dataset, via read.xport