tim.bock at numbers.net.au
2006-Jul-12 05:52 UTC
[Rd] read.spss() cannot import some SPSS files (PR#9074)
Full_Name: Tim Bock Version: 2.3.1 OS: Windows XP Submission from: (NULL) (220.233.111.181) SPSS v12 on Windows sometimes writes files with a layout_code of 3 instead of the usual layout_code of 2. While I don't know what this signifies, R is able to read these files if I change sfm-read.c to accept 3. Also, R issues an unnecessary warning when it finds records of type 7 with sub-type 7. These records describe multiple-response sets, which can safely be ignored. Here are my suggested changes, based on the foreign_0.8-15.tar.gz. (I'd be happy to commit these via svn, but I assume that this is not allowed for non-core developers.) 413a414> case 7: /* Multiple-response sets (later versions ofSPSS). */ 580a582> R_int32 orig_layout_code;651c653 < if (hdr.layout_code == 2) ---> if (hdr.layout_code == 2 || hdr.layout_code == 3)654a657> orig_layout_code = hdr.layout_code;656,658c659,661 < if (hdr.layout_code != 2) < lose ((_("%s: File layout code has unexpected value %d. Value should be 2, in big-endian or little-endian format"), < h->fn, hdr.layout_code)); ---> if (hdr.layout_code != 2 && hdr.layout_code != 3) > lose ((_("%s: File layout code has unexpected value %d (or %d,endian-reversed). Value should be 2 or 3, in big-endian or little-endian format"),> h->fn, orig_layout_code, hdr.layout_code));
Maybe Matching Threads
- spss long labels
- Bugs compiling R-1.7.1 with Intel compilers icc and ifc (PR#4295)
- 5023079 panic: sfm panic: sfmmu_tteload - tte remap, hmeblkp 0x70009ceec60.
- session setup rejected by PDC and BDCs (NT4 SP5)
- Advice requested: installation failing for foreign_0.8-7, mgcv_1.2-4, rpart_3.1-23, VR_7.2-15