[R] not a Stata version 5-12 .dta file
Anthony Damico
ajdamico at gmail.com
Fri Mar 20 05:09:40 CET 2015
doesn't just running this solve your problem?
https://github.com/ajdamico/usgsd/blob/master/World%20Values%20Survey/download%20all%20microdata.R
On Fri, Mar 20, 2015 at 12:04 AM, Nicole Ford <nicole.ford at me.com> wrote:
> Anthony,
>
> Thanks for this. The issue I am having is WVS didn’t save all of their
> stata files, it seems, as .dta. Further, the .rdata files are not loading
> correctly, either, giving me .Traceback or crashes R when I try to source
> it. I will poke around your link to see if it can provide any insight.
>
> ~n
>
>
>
>
>
>
>
> On Mar 19, 2015, at 9:09 PM, Anthony Damico <ajdamico at gmail.com> wrote:
>
> hi nicole, i have published easy to reproduce, well-documented code to
> download and then analyze every file from every wave of the world values
> survey here. the download automation script should solve your problem, or
> at least work around it :)
>
> http://www.asdfree.com/search/label/world%20values%20survey%20%28wvs%29
>
>
>
>
>
> On Thu, Mar 19, 2015 at 6:09 PM, Nicole Ford <nicole.ford at me.com> wrote:
>
>> the text didn’t send for the R data file erros. sorry about that.
>>
>>
>> 2015-03-19 17:41:38.544 R[398:5728] Unable to simultaneously satisfy
>> constraints:
>> (
>> "<NSAutoresizingMaskLayoutConstraint:0x6000018966c0 h=-&- v=-&-
>> H:|-(0)-[NSView:0x60000032da20] (Names: '|':FIFinderView:0x6080003612c0
>> )>",
>> "<NSAutoresizingMaskLayoutConstraint:0x6000012881b0 h=-&- v=-&-
>> H:[NSView:0x60000032da20]-(0)-| (Names: '|':FIFinderView:0x6080003612c0
>> )>",
>> "<NSAutoresizingMaskLayoutConstraint:0x600000a8c710 h=-&- v=-&-
>> H:|-(0)-[FIFinderView:0x6080003612c0] (Names:
>> '|':NSNavFinderViewFileBrowser:0x608000375fc0 )>",
>> "<NSAutoresizingMaskLayoutConstraint:0x60000128eb50 h=-&- v=-&-
>> H:[FIFinderView:0x6080003612c0]-(0)-| (Names:
>> '|':NSNavFinderViewFileBrowser:0x608000375fc0 )>",
>> "<NSAutoresizingMaskLayoutConstraint:0x600000c93fb0 h=--& v=--&
>> H:[NSNavFinderViewFileBrowser:0x608000375fc0(585)]>",
>> "<NSLayoutConstraint:0x60000149d740 H:|-(0)-[NSView:0x600000133ec0]
>> (Names: '|':NSView:0x60000032da20 )>",
>> "<NSLayoutConstraint:0x600001489880 H:[NSView:0x600000133ec0]-(0)-|
>> (Names: '|':NSView:0x60000032da20 )>",
>> "<NSLayoutConstraint:0x60000109e280
>> H:[FILocationPopUp:0x6000003fda00(207)]>",
>> "<NSLayoutConstraint:0x600000a82760 NSView:0x600000133ec0.centerX ==
>> FILocationPopUp:0x6000003fda00.centerX>",
>> "<NSLayoutConstraint:0x600000e835c0
>> H:[FILocationPopUp:0x6000003fda00]-(>=10)-[SGTSearchField:0x6000003bf800]>",
>> "<NSLayoutConstraint:0x60000069f2c0
>> H:[SGTSearchField:0x6000003bf800]-(11)-| (Names:
>> '|':NSView:0x600000133ec0 )>",
>> "<NSLayoutConstraint:0x6000006801e0
>> H:[SGTSearchField:0x6000003bf800(>=218)]>"
>> )
>>
>> Will attempt to recover by breaking constraint
>> <NSLayoutConstraint:0x6000006801e0
>> H:[SGTSearchField:0x6000003bf800(>=218)]>
>>
>> Set the NSUserDefault
>> NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have
>> -[NSWindow visualizeConstraints:] automatically called when this happens.
>> And/or, break on objc_exception_throw to catch this in the debugger.
>> > str(dat)
>> chr [1:2] ".Traceback" "WV3_Data_rdata_v_2014_09_21"
>> > ls(dat)
>> Error in as.environment(pos) :
>> no item called ".Traceback" on the search list
>> > dat
>> [1] ".Traceback" "WV3_Data_rdata_v_2014_09_21"
>> > sessionInfo()
>> R version 3.1.3 (2015-03-09)
>> Platform: x86_64-apple-darwin13.4.0 (64-bit)
>> Running under: OS X 10.10.1 (Yosemite)
>>
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>>
>> attached base packages:
>> [1] stats graphics grDevices utils datasets methods base
>>
>> other attached packages:
>> [1] readstata13_0.5-3 effects_3.0-3 lattice_0.20-30 lme4_1.1-7
>> Rcpp_0.11.2 Matrix_1.1-5 runjags_1.2.1-0 sm_2.2-5.4
>> [9] foreign_0.8-63 car_2.0-25
>>
>> loaded via a namespace (and not attached):
>> [1] coda_0.16-1 colorspace_1.2-4 grid_3.1.3 MASS_7.3-39
>> mgcv_1.8-4 minqa_1.2.3 nlme_3.1-120 nloptr_1.0.0
>> nnet_7.3-9
>> [10] parallel_3.1.3 pbkrtest_0.4-2 quantreg_5.11 SparseM_1.6
>> splines_3.1.3 tools_3.1.3
>> >
>>
>>
>>
>>
>> > On Mar 19, 2015, at 5:08 PM, Nicole Ford <nicole.ford at me.com> wrote:
>> >
>> > Ista,
>> >
>> > I am pulling multiple countries and multiple waves, but here is one
>> country in one wave. I know if I can get one to work, I can get them all
>> to work. I have used WVS data in the past and never encountered any
>> issues, so I am at a loss here. Thanks again!
>> >
>> > http://www.worldvaluessurvey.org/WVSDocumentationWV3.jsp<
>> http://www.worldvaluessurvey.org/WVSDocumentationWV3.jsp>
>> >
>> >
>> > ~Nicole
>> >
>> >
>> >
>> >
>> >
>> >
>> >> On Mar 19, 2015, at 4:59 PM, Ista Zahn <istazahn at gmail.com <mailto:
>> istazahn at gmail.com>> wrote:
>> >>
>> >> Is the file publicly available? What is the URL?
>> >>
>> >> Best,
>> >> Ista
>> >>
>> >> On Thu, Mar 19, 2015 at 4:46 PM, Nicole Ford <nicole.ford at me.com
>> <mailto:nicole.ford at me.com>> wrote:
>> >>> Hello, Ista.
>> >>>
>> >>> Honestly, I am uncertain. I don't have STATA -- I downloaded this
>> from the data source website.
>> >>>
>> >>> I can't imagine it is 13 because the data are old (2006).
>> >>>
>> >>> I tried package readstata13 out of desperation, but didn't think it
>> would resolve.
>> >>>
>> >>> Thanks for the suggestion!
>> >>>
>> >>> Sent from my iPhone
>> >>>
>> >>>> On Mar 19, 2015, at 4:41 PM, Ista Zahn <istazahn at gmail.com <mailto:
>> istazahn at gmail.com>> wrote:
>> >>>>
>> >>>> Hi Nicole,
>> >>>>
>> >>>> Is it a stata 13 data file? If so your best bet is to open it in
>> Stata
>> >>>> and use the "saveold" command to save it as a stata 12 file.
>> >>>>
>> >>>> Best,
>> >>>> Ista
>> >>>>
>> >>>>> On Thu, Mar 19, 2015 at 3:00 PM, Nicole Ford <nicole.ford at me.com
>> <mailto:nicole.ford at me.com>> wrote:
>> >>>>> Hello,
>> >>>>>
>> >>>>> I recently updated to the newest version of R and I am encountering
>> issues. Please find my error and session info below. My data are
>> attached. I have tried the readstata13 package just in case to no avail.
>> Unless I am missing something, google isn’t helping.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> Thank you in advance.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> error:
>> >>>>>> dat <- read.dta(file.choose())
>> >>>>> Error in read.dta(file.choose()) : not a Stata version 5-12 .dta
>> file
>> >>>>> 2015-03-19 14:14:21.445 R[398:5728] Unable to simultaneously
>> satisfy constraints:
>> >>>>> (
>> >>>>> "<NSAutoresizingMaskLayoutConstraint:0x608000490bd0 h=-&- v=-&-
>> H:|-(0)-[NSView:0x60000012eba0] (Names: '|':FIFinderView:0x600000363a80
>> )>",
>> >>>>> "<NSAutoresizingMaskLayoutConstraint:0x608000490e50 h=-&- v=-&-
>> H:[NSView:0x60000012eba0]-(0)-| (Names: '|':FIFinderView:0x600000363a80
>> )>",
>> >>>>> "<NSAutoresizingMaskLayoutConstraint:0x608000491120 h=-&- v=-&-
>> H:|-(0)-[FIFinderView:0x600000363a80] (Names:
>> '|':NSNavFinderViewFileBrowser:0x608000377400 )>",
>> >>>>> "<NSAutoresizingMaskLayoutConstraint:0x608000491170 h=-&- v=-&-
>> H:[FIFinderView:0x600000363a80]-(0)-| (Names:
>> '|':NSNavFinderViewFileBrowser:0x608000377400 )>",
>> >>>>> "<NSAutoresizingMaskLayoutConstraint:0x608000491350 h=--& v=--&
>> H:[NSNavFinderViewFileBrowser:0x608000377400(585)]>",
>> >>>>> "<NSLayoutConstraint:0x600000482d50
>> H:|-(0)-[NSView:0x60000012e380] (Names: '|':NSView:0x60000012eba0 )>",
>> >>>>> "<NSLayoutConstraint:0x600000482da0
>> H:[NSView:0x60000012e380]-(0)-| (Names: '|':NSView:0x60000012eba0 )>",
>> >>>>> "<NSLayoutConstraint:0x6000004816d0
>> H:[FILocationPopUp:0x6000001f2800(207)]>",
>> >>>>> "<NSLayoutConstraint:0x600000482a30 NSView:0x60000012e380.centerX
>> == FILocationPopUp:0x6000001f2800.centerX>",
>> >>>>> "<NSLayoutConstraint:0x6000004825d0
>> H:[FILocationPopUp:0x6000001f2800]-(>=10)-[SGTSearchField:0x6000003a5160]>",
>> >>>>> "<NSLayoutConstraint:0x600000482b70
>> H:[SGTSearchField:0x6000003a5160]-(11)-| (Names:
>> '|':NSView:0x60000012e380 )>",
>> >>>>> "<NSLayoutConstraint:0x6000004814f0
>> H:[SGTSearchField:0x6000003a5160(>=218)]>"
>> >>>>> )
>> >>>>>
>> >>>>> Will attempt to recover by breaking constraint
>> >>>>> <NSLayoutConstraint:0x6000004814f0
>> H:[SGTSearchField:0x6000003a5160(>=218)]>
>> >>>>>
>> >>>>> Set the NSUserDefault
>> NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have
>> -[NSWindow visualizeConstraints:] automatically called when this happens.
>> And/or, break on objc_exception_throw to catch this in the debugger.
>> >>>>>> sessionInfo()
>> >>>>>
>> >>>>> Session Info:
>> >>>>> R version 3.1.3 (2015-03-09)
>> >>>>> Platform: x86_64-apple-darwin13.4.0 (64-bit)
>> >>>>> Running under: OS X 10.10.1 (Yosemite)
>> >>>>>
>> >>>>> locale:
>> >>>>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> >>>>>
>> >>>>> attached base packages:
>> >>>>> [1] stats graphics grDevices utils datasets methods base
>> >>>>>
>> >>>>> other attached packages:
>> >>>>> [1] effects_3.0-3 lattice_0.20-30 lme4_1.1-7 Rcpp_0.11.2
>> Matrix_1.1-5 runjags_1.2.1-0 sm_2.2-5.4 foreign_0.8-63 car_2.0-25
>> >>>>>
>> >>>>> loaded via a namespace (and not attached):
>> >>>>> [1] coda_0.16-1 colorspace_1.2-4 grid_3.1.3 MASS_7.3-39
>> mgcv_1.8-4 minqa_1.2.3 nlme_3.1-120 nloptr_1.0.0
>> nnet_7.3-9
>> >>>>> [10] parallel_3.1.3 pbkrtest_0.4-2 quantreg_5.11
>> SparseM_1.6 splines_3.1.3 tools_3.1.3
>> >>>>>
>> >>>>> ~n
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> ______________________________________________
>> >>>>> R-help at r-project.org <mailto:R-help at r-project.org> mailing list --
>> To UNSUBSCRIBE and more, see
>> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help <
>> https://stat.ethz.ch/mailman/listinfo/r-help>
>> >>>>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> <http://www.r-project.org/posting-guide.html>
>> >>>>> and provide commented, minimal, self-contained, reproducible code.
>> >
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> <http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list