
Last chance! 50% off unlimited learning
Sale ends in
Creates a new object of SegDecomp-class
.
SegDecomp(d, coords, data, proj4string = CRS(as.character(NA)))
a numeric vector of length three, representing the locational, compositional, and qualitative segregation, respectively.
a numeric matrix or data frame with coordinates (each row is a point).
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).
an optional projection string of class CRS
.
An object of SegDecomp-class
.
# NOT RUN {
# 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 'SegDecomp'
v <- SegDecomp(d = numeric(3), coords = xy, data = pop)
is(v)
# }
Run the code above in your browser using DataLab