[R] Fwd: opening nimroad tar gz files in R

o1bigtenor o1b|gtenor @end|ng |rom gm@||@com
Thu Sep 15 13:48:36 CEST 2022

On Thu, Sep 15, 2022 at 6:11 AM Nick Wray <nickmwray using gmail.com> wrote:
> Hello
> I am trying to download data sets from the 1 km Resolution UK Composite
> Rainfall Data from the Met Office Nimrod System
> Eg
> CEDA Archive Web Browser
> <https://data.ceda.ac.uk/badc/ukmo-nimrod/data/composite/uk-1km/2004>
> /badc/ukmo_nimrod/data/composite/uk-1km/2004
> I can download an individual file (there are lots for each year) as a
> .gz.tar and then it appears as a TAR file in the directory I am using.
> I have then used the instruction untar() (targeted on the correct
> directory) and what this produces is about a dozen these files which are
> labelled as .gz files.  They appear in the same folder as the original TAR
> folder but as R files (ie although they have .gz in the name they have the
> R icon next to them as do any R progs which I have).  I can’t open them
> though as R progs (which I don’t really think they can be) and trying to
> just takes me back to the R studio interface.
> I’ve tried  -- read.table (gzfile
> ("metoffice-c-band-rain-radar_uk_200404062250_1km-composite.dat.gz")) but
> that just gives a load of error messages and I haven’t found any other way
> of opening them as .gz files.
> I’m rather baffled – can anyone make any suggestions?  Thanks Nick Wray

Hmmmmm - - - - not speaking as any kind of 'R' expert but I have a little bit
of familiarity with the use of 'linux'.

I was taught to open files that are in this format :


(first file in your proffered url)
in this fashion.

$ tar -xvf archive.tar.gz

this means that you are not just 'untarring' the file you need to also remove
the .gz which is another compression mechanism (gunzip is the command
for just that).

Try that - - - if further difficulties someone else will have a better answer.


(for example you would have :
$ tar -xvf metoffice-c-band-rain-radar_uk_20040406_1km-composite.dat.gz.tar
for that first file.)

More information about the R-help mailing list