Learn R Programming

BayesX (version 0.2-3)

createxymap: Create map objects for some points and a given distance

Description

Creates a map object from a list of coordinates by treating observations within a certain distance as neighbors. The resulting neighborhood structure is stored in a map object in graph format while a map in boundary format is created to enable visualisation.

Usage

createxymap(x, y, districts=NULL, p=2, max.dist)

Arguments

Value

List of two elements: map object in graph format and map object in boundary format.

See Also

read.gra,read.bnd,drawmap

Examples

Run this code
x <- c(3,3,5,9.5,11,11)
y <- c(2,4,4,6,4.5,5)
xymap <- createxymap(x, y, districts=c("A","B","C","D","E","F"), max.dist=2)
xymap$gra
drawmap(map=xymap$bnd)

Run the code above in your browser using DataLab