Created a data frame using simulated data and tried to save it as a dta file, this led R to crash with segfault error. Using R version 3.1.2 on a Mac with OSX 10.10.2.
library(haven) library(plyr) set.seed(12345) N=300 var1 = rnorm(N,0,1.5) var2 = rnorm(N,2,5) var3 = runif(N,-10,10) dataForStata = data.frame(var1,var2,var3) names(dataForStata) = c("var1","var2","var3") write_dta(dataForStata,path="~/Desktop/")
Running the code produces the following error:
> write_dta(dataForStata,path="~/Desktop/") *** caught segfault *** address 0x68, cause 'memory not mapped' Traceback: 1: .Call("haven_write_dta", PACKAGE = "haven", data, path) 2: write_dta(dataForStata, path = "~/Desktop/") Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace
R session info:
sessionInfo() R version 3.1.2 (2014-10-31) Platform: x86_64-apple-darwin14.0.0 (64-bit) locale:  en_US/en_US/en_US/C/en_US/en_US attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  plyr_1.8.1 haven_0.1.1.9000 loaded via a namespace (and not attached):  Rcpp_0.11.4
The text was updated successfully, but these errors were encountered: