methods_m_surr: Method for class m_surr

methods_m_surrR Documentation

Method for class m_surr

Description

A function to plots the m-surrounds give an object of the class m_surr obtain with the code m.surround.
The plot() function allows the user view the configuration of the m-surroundings.
The argument type select the type o visualization.
The print() print the matrix of the m-surrounding.
. The summary give information about the characteristics of the m-surroundings.
.

Usage

## S3 method for class 'm_surr'
summary(object, ...)

## S3 method for class 'm_surr'
plot(x, ..., type = 1)

## S3 method for class 'm_surr'
print(x, ...)

Arguments

object

object of class m_surr. 2 plot W matrix with network

...

further arguments passed to or from other methods.

x

object of class m_surr

type

numeric. 1 (default) to get the plot with igraph.

Value

No return value, called for side effects

Author(s)

Fernando López fernando.lopez@upct.es
Román Mínguez roman.minguez@uclm.es
Antonio Páez paezha@gmail.com
Manuel Ruiz manuel.ruiz@upct.es

References

  • Ruiz, M., López, F., and Páez, A. (2021). A test for global and local homogeneity of categorical data based on spatial runs. Working paper.

Examples


# Example 1: Obtain m-surroundings with degree of overlapping r
N <- 100
cx <- runif(N)
cy <- runif(N)
x <- cbind(cx,cy)
m = 4
r = 2
msurr_points <- m.surround(x = x, m = m, r = r,control = list(dtmaxabs = 0.5))
plot(msurr_points, type = 1)
plot(msurr_points, type = 2)
print(msurr_points)

# Example 2:
data("FastFood.sf")
m = 6
r = 1
msurr_points <-  m.surround(x = FastFood.sf, m = m, r = r, distance = "Euclidean",
                            control = list(dtmaxpc = .01))
plot(msurr_points, type = 1)
plot(msurr_points, type = 2)
print(msurr_points)


spqdep documentation built on March 28, 2022, 5:06 p.m.