[R] RODBC for importing dbf

juli g. pausas juli at ceam.es
Fri May 10 15:13:54 CEST 2002


Hi
I know that it is very easy to import data from a dbf file to R, by
saving the data as csv, for instance.
However, I have several hundreds of files to do that. So, I thought of
using RODBC to read the dbf files and save it as data.frame. However, I
cannot even start (this is my first time using such package):

> library(RODBC)
> bdades <- odbcConnect("prova.DBF")
Warning message:
ODBC connection failed in: odbcConnect("prova.DBF")
> dir(pattern="pr")
[1] "prova.DBF"

My idea was to use sqlFetch(bdades) to create an R data.frame.
I'm using R on Windows. I can open the file prova.DBF with Excel without
any problem.
What I'm doing wrong? Any comment or suggestion will be welcome.
Thanks

Juli




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list