Description Objects from the Class Slots Methods Extends Author(s) See Also Examples
A class to hold results from spatseg
.
Objects can be created by calls to spseg
, or the constructor SegSpatial
.
an object of class numeric
containing the spatial dissimilarity index value.
an object of class numeric
containing the spatial diversity index value.
an object of class numeric
containing the spatial information theory index value.
an object of class matrix
that has the spatial exposure/isolation of all population groups.
see SegLocal-class
.
signature(from = "SegSpatial", to = "SpatialPoints")
: coerce an object of class SegSpatial
to an object of class SpatialPoints
. The points have no attribute data.
signature(from = "SegSpatial", to = "SpatialPointsDataFrame")
: coerce an object of class SegSpatial
to an object of class SpatialPointsDataFrame
. The values in the slot ‘data’ will be used as the attribute data.
signature(from = "SegSpatial", to = "SpatialPixelsDataFrame")
: coerce an object of class SegSpatial
to an object of class SpatialPixelsDataFrame
. The values in the slot ‘data’ will be used as the attribute data. May not work when the points are irregularly spaced.
signature(from = "SegSpatial", to = "list")
: retrieve the segregation index values and return it as a list
object.
signature(x = "SegSpatial")
: same as the above.
signature(object = "SegSpatial")
: show the segregation index values.
signature(x = "SegSpatial")
: same as show
.
signature(obj = "SegSpatial")
: coerce an object of class SegSpatial
to an object of class SpatialPixelsDataFrame
or SpatialPointsDataFrame
and display it. See help(spplot)
for more details about the graphical parameter arguments.
SegLocal-class
.
Seong-Yun Hong
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # creates 100 regularly-spaced data points and 3 population groups
xy <- expand.grid(1:10, 1:10)
colnames(xy) <- c("x", "y")
pop <- matrix(runif(300), ncol = 3)
env <- matrix(runif(300), ncol = 3)
colnames(pop) <- LETTERS[1:3]
colnames(env) <- LETTERS[4:6]
# constructs an object of class 'SegSpatial'
v <- SegSpatial(d = numeric(), r = numeric(), h = numeric(),
p = matrix(0, 0, 0),
coords = as.matrix(xy), data = pop, env = env)
print(v)
# changes the spatial dissimilarity index value
slot(v, "d") <- runif(1)
# retrieves the index values
as.list(v)
# displays the values in the slot 'data'
spplot(v, col.regions = heat.colors(20))
# displays the values in the slot 'env'
w <- as(v, "SegLocal")
spplot(w, col.regions = heat.colors(20))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.