eq.lattice: Create equivalent lattice network

Description Usage Arguments Value Examples

View source: R/eq.lattice.R

Description

This function generates the equivalent lattice for a given weighted network.

Usage

1
eq.lattice(adjacency, directed = FALSE, ntry = NULL, measure = "am")

Arguments

adjacency

An adjacency matrix.

directed

Logical scalar. If FALSE (the default) the network is considered as directed, otherwise undirected.

ntry

Number of trials to swap edges. If NULL, the number will be 4 times of the number of edges.

measure

The method used to measure the value of triplet in a network.

"am" implies the arithmetic mean method (default).

"gm" implies the geometric mean method.

"mi" implies the minimum method.

"ma" implies the maximum method.

"bi" implies the binary measure.

Value

Equivalent lattice network of the specified network in the form of adjacency matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
net <- rbind(c(1,2,4),
c(1,3,2),
c(1,5,3),
c(2,1,4),
c(2,4,1),
c(2,6,1),
c(3,1,2),
c(3,2,4),
c(4,2,1),
c(4,5,2),
c(5,2,2),
c(6,5,1))
adjacency <- edgelist.to.adjacency(net)
lattice <- eq.lattice(adjacency, directed = TRUE)
clustering_w(adjacency)
clustering_w(lattice)

hangxiong/wNetwork documentation built on May 17, 2019, 2:28 p.m.