Re: [R] reading multiple .dbf files

From: Jerome Asselin <jerome.asselin.stat_at_gmail.com>
Date: Mon, 16 May 2011 15:40:05 -0400

On Mon, 2011-05-16 at 08:40 -0700, Neera Thapa wrote:

> Hello..
> I am currently working on running random forest to make predictions. For that I
> have a bunch of.dbf files from shapefiiles. Earlier I was running random forest
> on those dbf files individuallybut now I have >1,000 such files and procesisng
> one by one is not an option.
>
> I started by trying to read multiple dbf files as:
> >setwd (..)
> >a=list.files()
> > for (x in a)(u=read.dbf(x))
>
> but i get error
> Error in get("read.dbf", "package:foreign")(dbf.name) :
> unable to open DBF file
>
> How can I read these files at once?

What is the value of x after you get the error? x should be a file name. Is it really a valid DBF file?

Jerome

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 16 May 2011 - 19:46:59 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 May 2011 - 20:10:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive