Calculate Network Statistics Matrix
network_matrix.RdThis function is aimed at calculating network statistics of the neighborhood
network of each cell. The output is a network statistics matrix.
Usage
network_matrix(
coordinate,
index,
radius = NULL,
NN = NULL,
edge,
fun = centralities,
length_output = 30,
name_output = NULL
)Arguments
- coordinate
a data frame containing cell indices and x and y coordinates which are labeled as index, x_center and y_center, respectively.
- radius
the maximal radius length of a neighborhood. The cells whose distance to the center cell is larger than this length are not
included in the neighborhood.- NN
the number of nearest neighbors. If not NULL, only the nearest NN cells will be included in neighborhood.
- edge
the maximal length of the network edge.
- fun
the function which calculates the statistics of a network.
Two arguments are supposed to be in this function. The first one is a network object
and the second one is an index indicating the statistics of which vertex (cell) should be calculated.
The default function is centralities.- length_output
the number of statistics calculated in the argument fun.
The default value is 30, which is the number of statistics in the centralities function of this package.- name_output
the names of statistics calculated in the argument fun.