I would like to read a binary file in R. The file is available for download here: just select one of the files, download and unzip. The instructions on how to open the files are at page 6 of this document.
I have tried to adapt some code taken from previous questions, but does not work in my case. Can anyone help?
EDIT:
I see that is crucial to understand the structure of the binary file. That is number of rows and columns.
The manual (link above) says that there are 5 variables.
Thus, in R I run:
# read column names
column.names <- readBin("gpcp_v2.2_psg.1979", character(), n = 5)
Now I need to read the actual data with:
bindata <- readBin(read.filename, integer(), n = nrows*ncolumns)
However, I do not understand how to retrieve the number of rows of my data in oder to enter the right value for "nrows*ncolumns".