Bug 15248 - Attached dBase file not loaded correctly by read.dbf()
Summary: Attached dBase file not loaded correctly by read.dbf()
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Add-ons (show other bugs)
Version: R 3.0.0
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2013-03-28 10:40 UTC by Milan Bouchet-Valat
Modified: 2013-03-28 10:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Bouchet-Valat 2013-03-28 10:40:36 UTC
The attached .dbf file, which is provided on their website [1] by the French national statistical office (INSEE), is not loaded correclty by R, while LibreOffice opens it fine. Factors only have one level, often labelled with invalid characters.

(I cannot exclude that the file is incorrect, but LibreOffice is too tolerant...)

The code is simply:
library(foreign)
dat <- read.dbf("parent1.dbf")
str(dat)
str(dat$IDENT)


This was tested with R-devel revision 62420 64-bit (foreign_0.8-53) on Fedora 18, with R 2.15.3 64-bit on Windows 7, and with R 2.15.1 32-bit on Windows Vista.


1: http://telechargement.insee.fr/fichiersdetail/edufa03/dbase/edufa03_parent_dbase.zip