[R] maps in R

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jun 27 17:38:40 CEST 2001


On Wed, 27 Jun 2001, Tim Hoar wrote:

> 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.

Can I suggest you note that R-data.texi says

  Binary connections (@ref{Connections}) are now the preferred way to
  handle binary files, and package @pkg{Rstreams} will be withdrawn in
  late 2001.

and act accordingly.  readBin, for example, has an `endian' argument
that makes this transparent to the user.

>
> Tim
>
> > Date: Wed, 27 Jun 2001 11:03:13 +1200 (NZST)
> > From: Ray Brownrigg <Ray.Brownrigg at mcs.vuw.ac.nz>
> > To: r-help at stat.math.ethz.ch
> > Subject: Re: [R] maps in R
> >
> > > Hello. Any idea if this map package will be ported to R-windows?
> > > What is in it that is Unix/Linux dependent?
> > > not the computations and projections, must be only the plotting?
> > >
> > Why don't you try it?  I don't use Windows, so have no hope of doing any
> > testing (and no incentive to try).
> >
> > That said, I think there may still be an issue with licensing of the old
> > AT&T code.  It is said to be 'public domain' and the authors have no
> > problems with wider dissemination, but you try and get an authoritative
> > letter out of Lucent Technologies for some code 'owned' by AT&T Bell
> > Laboratories 10 years ago.....
> >
> > Further, as Brian Ripley has mentioned, the binary databases are
> > different for big-endian/little-endian, so for a package to work, you
> > would have to go back to the data sources or keep two copies of the
> > databases.  This would make the package even larger, unless you extract
> > the databases to a separate package or three.  [I use a series of C
> > programs to convert the database formats between (S-Plus) Unix/Windows
> > and between (SPARC) S-Plus and (Intel) R.  Until recently I was not
> > able to create new databases under Linux/Intel.]
> >
> > Regards,
> > Ray Brownrigg
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > 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
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> >
>
> ## 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list