[R-sig-Geo] nndist {spatstat} distance unit output

Rolf Turner r.turner at auckland.ac.nz
Tue Sep 24 01:34:55 CEST 2013


On 09/24/13 08:31, Paolo Ramoni Perazzi wrote:
> Hi everybody,
>
> A quite stupid question: does anybody know how to set the distance units
> (km, m, etc) when using nndist (spatstat library)?

The distance units are determined by the pattern "X" to which you are 
applying
nndist.  You can change those units by applying the rescale() function to X.

E.g.

     X <- rescale(bei,1000)
     unitname(X) <- "kilometre"

     cheers,

     Rolf Turner

P. S.  It is the spatstat ***package*** not "library"!!!  (A library is 
a *collection*
of packages.)  Repeat after me, 50 times: "spatstat ***package***, spatstat
***package***, ...."!!! :-)

     R. T.



More information about the R-sig-Geo mailing list