Learn R Programming

seg (version 0.2-2)

SegLocalEnv: Create an Object of Class SegLocalEnv

Description

Create a new object of class SegLocalEnv from a matrix of coordinates and population data.

Usage

SegLocalEnv(coords, data, env, proj4string = CRS(as.character(NA)))

Arguments

coords
a numeric matrix or data frame with coordinates (each row is a point).
data
an object of class matrix containing the population of each group at each data point. The number of rows in data should equal the number of points in coords, and the number of columns should be greater than o
env
an optional object of class matrix containing the local environment parameters. Must be the same dimensions as data. If missing, use data.
proj4string
an optional projection string of class CRS.

Value

  • An object of class SegLocalEnv.

See Also

getSegLocalEnv, update.SegLocalEnv, spseg, SegLocalEnv-class

Examples

Run this code
# Create a random data set with 50 data points and 3 population groups
xy <- matrix(runif(100), ncol = 2)
pop <- matrix(runif(150), ncol = 3)
localenv <- SegLocalEnv(coords = xy, data = pop)

Run the code above in your browser using DataLab