Description Usage Arguments Value Author(s) See Also Examples
An object that stores the nearest k-neighbours for a set of locations.
1  | neighbourhood(data, distances, index, var, coVar, prediction)
 | 
data | 
 A data.frame that contains the variables of interest for each local neighbourhood.  | 
distances | 
 A matrix with all the separating distances per local neighbourhood.  | 
index | 
 An index pointing from each neighbourhood to the corresponding spatial IDs.  | 
var | 
 The variable's name.  | 
coVar | 
 The covariate's name.  | 
prediction | 
 whether this neighbourhood is intended to be used for prediction or fitting purpose.  | 
A neighbourhood object.
Benedikt Graeler
1 2 3 4 5 6 7 8 9 10  | library("sp")
spdf <- data.frame(x=c(112,154,212,289),y=c(124,198,85,168),measure=rlnorm(4))
coordinates(spdf) <- ~x+y
neigh <- getNeighbours(spdf,size=4)
neigh
# rebuilding neigh
neighbourhood(neigh@data, neigh@distances, neigh@index, neigh@var,
              neigh@coVar, neigh@prediction)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.