Description Usage Arguments Details Value
Fill in a LOGICAL matrix indicating for each location in a [p] set the corresponding nearest neighbour in a [ng] grid.
1 | calcHnn(G, gLON, gLAT, pos)
|
G |
LIST, a codegmeta6 object as defined by the package spgrass6 with grid metadata for regular grids |
gLON |
REAL, [ng] coordinates for irregular grids, longitude |
gLAT |
REAL, [ng] coordinates for irregular grids, latitude |
pos |
REAL, [p,2], point coordinates |
This function would most commonly be called by analyseUG
.
For irregular grids, nearest grid neighbours to the point dataset is
calculated via nn2dist
in the package splancs.
A [p,ng] dgCMatrix
as provided by the package Matrix, where
p
is the number of point locations, and ng
is the number
of cells in the grid. The grid is assumed to be sortened starting fro
the upper left and advancing by row.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.