methods_m_surr | R Documentation |
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.
.
## 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, ...)
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. |
No return value, called for side effects
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 |
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.