When I run stackQuestion.R in RStudio containing the following code:
library(haven)
write_dta(data.frame(a=1), "test.dta")
it works fine.
When I run
RScript --vanilla stackQuestion.R
from the Mac Terminal I get the error
Fehler in eval(substitute(expr), envir, enclos) : Writing failure: Unable to write data. Ruft auf: write_dta -> write_dta_ -> .Call
Update:
Now, also the first code does not work anymore. I always get the error:
Fehler in eval(substitute(expr), envir, enclos) : Writing failure: Unable to write data.
Exorting via "foreign" works fine (so there are no issues concering writing rights).
library(foreign)
write.dta(data.frame(a=1), "test.dta")
I am really at a loss here and any hints are highly appreciated!
OS: macOS 10.12.2 (16C67) RStudio: 1.0.136 R: 3.3.2 (2016-10-31)