I am trying to read gzipped .bin files (.gz) from FTP-server (archived southern Asia area NOAA/Climate Prediction Center RFE2.0 daily rainfall estimates). Here the link: ftp://ftp.cpc.ncep.noaa.gov/fews/S.Asia/ Firstly I have downloaded a file and have tried to unzipp it in R:
read.table(gzfile("cpc_rfe_v2.0_sa_dly.bin.20010501.gz"))
file <- untar("cpc_rfe_v2.0_sa_dly.bin.20010501.gz")
remfname <- "ftp://ftp.cpc.ncep.noaa.gov/fews/S.Asia/data/cpc_rfe_v2.0_sa_dly.bin.20010501.gz"
locfname <- "cpc_rfe_v2.0_sa_dly.bin.20010501.gz"
download.file(remfname, locfname)
con <- gzcon(file(locfname, "rb"))
None of these commands have function... The next problem is that I just need a subset of the data for specific countries (daily rainfall estimates for Vietnam (since 2012) and Thailand (since 2001)). But I cannot read the bin.gz file in R so I don´t know the structure of the dataset. I found a tread with a similar question but this also didn´t function: R: reading a binary file that is zipped.
Could you please help me how to solve this/these problem(s)? I will appreciate any ideas...