Functions to read and write gzip compressed Stata files

Share:

Description

read.dta.gz and write.dta.gz allow one to read and write gzip compressed stata files

Usage

1
2
3

Arguments

dataframe

Dataframe

file

String giving filename

...

Passed onto either write.dta or read.dta

Examples

1
2
3
4
5
6
df <- data.frame(x=rnorm(10), y=runif(10))
target <- tempfile("foo.dta.gz")
write.dta.gz(df, target)
df2 <- read.dta.gz(target)
all.equal(df, df2)
unlink(target)