SegLocal: Create an Object of Class SegLocal

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SegLocal-class.R

Description

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

Usage

1
SegLocal(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 data 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 one (i.e., at least two population groups are required).

env

an object of class matrix containing the local environment parameters. Must be the same dimensions as ‘data’.

proj4string

an optional projection string of class CRS.

Value

An object of SegLocal-class.

Author(s)

Seong-Yun Hong

See Also

SegLocal-class, localenv

Examples

1
2
3
4
5
6
7
8
9
# creates a random data set with 50 data points and 3 population groups
xy <- matrix(runif(100), ncol = 2)
colnames(xy) <- c("x", "y")
pop <- matrix(runif(150), ncol = 3)
colnames(pop) <- LETTERS[1:3]

# constructs an object of class 'SegLocal'
v <- SegLocal(coords = xy, data = pop, env = pop)
is(v)

seg documentation built on Dec. 19, 2019, 1:09 a.m.