Closed ericmelse closed 7 years ago
Hey, if the file you are trying to read is in that folder, check it with dir()
, importing should work like this dat <- read.dta13("auto13.dta", convert.factors=FALSE)
. The system.file part is only required for our tests with files we ship with the package, not for enduser files.
Hope that helps,
Marvin
Dear Marvin, Yes! This works, and I also was able to export a R data frame and save it as a Stata dta file. Many thanks for your quick advise as well as for this cool package. (When time permits, you might consider a similar package for the Stata 14 dta format.)
Dear Eric, that is already implemented. You can import Stata 14 dta-files and write Stata 14 dta-file. Have a look at the help pages. Marvin
Although I am certain that the Stata13 file is located in the directory:
setwd("C:/Ftpfolder/StataStuff/dta13")
I get the error "File not found" using this syntax:dat <- read.dta13(system.file("auto13.dta", package="readstata13"), convert.factors=FALSE)
What am I doing wrong?