[Rd] read.table: aborting based on a time constraint

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jan 9 21:27:47 CET 2008


That was supposed to be file.info()$size

On Jan 9, 2008 3:27 PM, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> Use file.file()$size to find out how large the file is
> and skip files larger than some cutoff.
>
> On Jan 9, 2008 2:01 PM, Derek Stephen Elmerick <delmeric at gmail.com> wrote:
>
> > Hello –
> >
> > I am trying to write code that will read in multiple datasets;
> > however, I would like to skip any dataset where the read-in process
> > takes longer than some fixed cutoff. A generic version of the function
> > is the following:
> >
> > for(k in  1:number.of.datasets)
> > {
> >   X[k]=read.table(…)
> > }
> >
> > The issue is that I cannot find a way to embed logic that will abort
> > the read-in process of a specific dataset without manual intervention.
> > I scanned the help manual and other postings, but no luck based on my
> > search. Any thoughts?
> >
> > Thanks,
> > Derek
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>



More information about the R-devel mailing list