Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

File geodatabase (fgdb) includes numerous file geodatabase tables. As far as I know they exist as dbf files, but are within a Database.gdb.

In ArcCatalog, the file pathway resembles C:\Users\...\Database.gdb\Stats_AA.

How to read all of these dbf files into R (a statistical software)? What is the correct pathway to supply? The function used is read.dbf (in the foreign package).

Variants of




don't work. What's the correct "form" of the file name to be used, or, do I need to export all of the file geodatabase tables into some other form or location?

share|improve this question
geodatabases store geometry in blob fields not dbf (but shapefile does). – Mapperz Feb 1 '13 at 21:44
I was going to suggest using Esri's oledb provider for file geodatabases, however it appears that R cannot read oledb. Might want to upvote that question, and also this one. – Kirk Kuykendall Feb 2 '13 at 14:59

3 Answers 3

up vote 3 down vote accepted

A simple solution is to use Table to dBase (multiple) to export your tables (Right click FGDB > Export > To dBase (multiple). You can also use this tool to export attribute tables contained within FGDB feature classes. Just drag and drop tables and or feature classes into the tool and specify an output folder. Of course, then you can loop through the folder containing the new dBase files using R.

enter image description here

enter image description here

share|improve this answer
This works- my dropdown menu doesn't look the same (I'm sorry, I don't fully understand ArcMap file systems) but I found I can export tables by right clicking on the table entry itself in the Table of Contents, and generate a readable .dbf file. Thanks! – Nan Feb 2 '13 at 22:19

File geodatabases don't store their data as a dbf, shapefiles do. FGDB's use their own internal storage method.

ESRI's published an API, if use it to compile GDAL with file geodatabase support you might be able to use R's gdal plugins to get access to your data that way. However, the easiest solution is probably converting your data to shapefile, then you can use R's dbf tools.

share|improve this answer
Or just export the attribute table as a dbf rather than converting the entire feature class. – Baltok Feb 1 '13 at 21:14
Oh that's true! You can also use the Xtools toolbar to export the attribute table directly to Excel. The free version of the toolbar includes the Excel export ability. – HeyOverThere Feb 1 '13 at 21:16
@HeyOverThere- thanks for pointing that out, you are correct- these tables are "File Geodatabase Tables" which explains why I couldn't find them as .dbf files. I'm going with Aaron's exporting approach, however, converting all of my data into shapefiles would be more time consuming. – Nan Feb 2 '13 at 22:25
The API link appears to be dead. Could you please update it? – Aaron Jun 18 at 17:14
Looks like ESRI did some housecleaning. The link's updated to point to the new location – HeyOverThere Jun 22 at 13:29

I ran into the same problem. It is inconvenient to use ArcMap, in my opinion. Instead, I invoked python from R using the following code. It requires you to have Arcpy, unfortunately.

Python script:

import os,sys
import arcpy
from arcpy import env
from sys import argv ### This is needed to import variables

script, featureClass, inFeatures, outLocation, outFeatureClass = argv
env.workspace = featureClass ### set working directory
arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation,outFeatureClass)

R code:

script = "./Path To Python Script/"
featureClass = './Path To Geodatabase/Example.gdb'
inFeatures = "featureClass"
outLocation = "./Path To Outfile Location"
outFeatureClass = "test.shp"
system2('python', args = c(shQuote(script),shQuote(featureClass),shQuote(inFeatures),shQuote(outLocation),shQuote(outFeatureClass))) 

The above will output a shapefile from a geodatabase, then you will have to import into R.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.