write_stata_old: Write Stata DTA out in older format

Description Usage Arguments Value Examples

View source: R/write_stata_old.R

Description

Convert Stata DTA files to older format for older versions

Usage

1
write_stata_old(path, out_path = path, version = 13)

Arguments

path

path to .dta file

out_path

output path of .dta file (assumed to be the same as input if unspecified)

version

version of Stata file to write out

Value

Path of .dta

Examples

1
2
3
4
5
filename = "cars.dta"
haven::write_dta(data = datasets::cars, path = filename, version = 14)
# can't read this in with stata 13
statamd::write_stata_old(path = filename)
file.remove(filename)

muschellij2/statamd documentation built on May 29, 2019, 2:53 p.m.