Skip to content
Prev 11985 / 398503 Next

maps in R

as pertains the binary databases, I was able to (easily) successfully
use the Rstreams functions to read the "opposite"-endian binary file.

The binary file was created on a Sun and successfully read on a Pentium:


s <- openstream(filename, "read")
bogus  <- readint(s, n = 1, size = 4, signed = TRUE, swapbytes = TRUE);
datvec <- readfloat(s, n=nLats*nLons*nLevels, size=4)
bogus  <- readint(s, n = 1, size = 4, signed = TRUE, swapbytes = TRUE);
closestream(s)


In this case, the binary file was a Fortran unformatted write, so there
were 4byte record words at the beginning and end.  Not using them does
make life a little more dangerous.

As it turns out, the original "poster" (Claudia) works across town in
a different division, we'll probably work together on this and see what
we can come up with.

Tim
## Tim Hoar, Associate Scientist              email: thoar at ucar.edu     ##
## Geophysical Statistics Project             phone: 303-497-1708       ##
## National Center for Atmospheric Research   FAX  : 303-497-1333       ##
## Boulder, CO  80307                    http://www.cgd.ucar.edu/~thoar ##

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._