[R] Rate of Reading into R from net

Enrico Schumann e@ @end|ng |rom enr|co@chum@nn@net
Mon Nov 14 14:37:58 CET 2022

On Mon, 14 Nov 2022, Nick Wray writes:

> Hello I am trying read  nc rainfall  files directly from the UK centre for
> hydrology and ecology website -
> hourly:about 300Mb
> https://catalogue.ceh.ac.uk/datastore/eidchub/fc9423d6-3d54-467f-bb2b-fc7357a3941f/
> and daily about 90Mb
> https://catalogue.ceh.ac.uk/datastore/eidchub/2ab15bf0-ad08-415c-ba64-831168be7293/precip/
> I can download them "by hand" no problem using the ncdf4 package but
> there's lots and I wanted to streamline the process
> code I've used (which works for "by hand" downloading) is (for example)
> nc_data<-nc_open("
> https://catalogue.ceh.ac.uk/datastore/eidchub/2ab15bf0-ad08-415c-ba64-831168be7293/precip/chess-met_precip_gb_1km_daily_19610301-19610331.nc
> ")
> However, when I run this I don't get an error message but R just sits there
> with the little red circle (at least 30 minutes for the 90Mb files)
> What I'm wondering is two things - a)is the data in fact downloading but
> it's just taking ages and I need to let it run and go and have a coffee
>                                                    b)is there (I can't find
> anything) within R which allows me to monitor the progress of the download,
> if in fact it is taking place?
> Thanks Nick Wray

Have you tried 'download.file'?  It should provide a
progress bar if the file size is known.  I'd first
download the file, and then read it.

Enrico Schumann
Lucerne, Switzerland

More information about the R-help mailing list