ajdamico / asdfree

analyze survey data for free
http://asdfree.com/
GNU General Public License v3.0
609 stars 450 forks source link

Download issue with ESS data #14

Closed briatte closed 10 years ago

briatte commented 10 years ago

Excellent ESS code!

But I got the following error towards the end, while downloading ESS Round 1:

importing /download.html?file=ESS1cfNO&c=NO&y=2002 ...
Error in factor(x@.Data, levels = values[use.levels], labels = labels[use.levels]) : 
RMate stopped at line 0
  invalid 'labels'; length 2 should be 1 or 1
Calls: data.frame ... as.data.frame.double.item -> as.factor -> as.factor
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted

Could it be due to some SPSS import setting?

P.S. I have not forgotten that I need to work on Insee data when I get some free time!

ajdamico commented 10 years ago

heyo :) what is your traceback() and sessionInfo() ?

briatte commented 10 years ago

I'll post the traceback in 24 hours when I get back to a network that lets me download that much data — in the meantime, session info looks like

> sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

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] tools     graphics  grDevices datasets  stats     grid      utils     methods   base     

other attached packages:
[1] foreign_0.8-59  memisc_0.96-9   MASS_7.3-30     lattice_0.20-27 XML_3.95-0.2   
[6] httr_0.2        ggplot2_0.9.3.1 devtools_1.4.1 

loaded via a namespace (and not attached):
 [1] car_2.0-19         colorspace_1.2-4   dichromat_2.0-0    digest_0.6.4      
 [5] evaluate_0.5.1     gtable_0.1.2       labeling_0.2       memoise_0.1       
 [9] munsell_0.4.2      nnet_7.3-7         parallel_3.0.3     plyr_1.8.1        
[13] proto_0.3-10       RColorBrewer_1.0-5 Rcpp_0.11.1        RCurl_1.95-4.1    
[17] reshape2_1.2.2     scales_0.2.3       stringr_0.6.2      whisker_0.3-2  

The use.levels part of the error looks like an issue with read.spss. I checked for package updates, I'm one minor version behind on httr, but would be surprised if that was the cause of the error.

briatte commented 10 years ago

P.S. I ran foreign 0.8-59, but Brian Ripley has documented an update to read.spss between that version and the current one: see changelog, 2014-01-26, I'll have to try again tomorrow. Rounds 2-6 downloaded alright, though.

ajdamico commented 10 years ago

sorry, it's not you it's me. this commit fixes the problem, you should be able to re-run without a problem :) thanks for the bug report!