[R] ppinit
Roger Bivand
Roger.Bivand at nhh.no
Mon Jun 13 21:47:45 CEST 2005
On Mon, 13 Jun 2005 SuzieBlatt at netscape.net wrote:
>
> Probably a simple question, but I can't find the answer to it ... In the
> 'ppinit' code it describes how it takes a 'file in standard format' and
> creates a point process object with it. Can anyone enlighten me as to
> what this 'standard format' is? The example given doesn't allow me to
> view the '.dat' file that apparently is in this format. Thanks, Suzie
The ppinit() function is in the spatial package, for which the book:
Venables, W. N. and Ripley, B. D. (2002) _Modern Applied Statistics with
S._ Fourth edition. Springer, is the documentation. There (p. 433) you
see that the function reads point coordinates in 2D, and the bounding
coordinates of a rectangular domain.
If you just enter the function name at the prompt, you'll see its code,
from which the rest follows, that is you get a list with x and y
components, and the definition of the rectangle. In addition ppinit()
calls ppregion() to set the domain for analysis.
If you'd like to look at an example:
file.show(system.file("ppdata", "towns.dat", package = "spatial"))
will show you the file provided with the package.
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list