mapPoints: Map GPS points to polygon regions

View source: R/mapPoints.R

mapPointsR Documentation

Map GPS points to polygon regions

Description

Map GPS points to polygon regions

Usage

mapPoints(data, geo, long, lat, names)

Arguments

data

point data with two columns of GPS locations.

geo

SpatialPolygonsDataFrame of the map

long

column name for longitudinal coordinate in the data

lat

column name for latitude coordinate in the data

names

character vector of region ids to be added to the neighbours list

Value

Spatial djacency matrix.

Author(s)

Zehang Richard Li

Examples

data(DemoMap) 
dat <- data.frame(ID = c(1,2,3), lon = c(32.2, 33.7, 33), lat = c(0.1, 0.9, 2.8))
dat2 <- mapPoints(dat, DemoMap$geo, long = "lon", lat = "lat", names = "REGNAME")
dat2
 

martinbryan/SUMMER documentation built on April 10, 2024, 5:03 a.m.