Learn R Programming

backbone (version 2.0.0)

sparsify.with.geometric: Extract Goldberg and Roth's (2003) Geometric backbone

Description

sparsify.with.geometric is a wrapper for sparsify() that extracts the geometric backbone described by Goldberg and Roth (2003). It is equivalent to sparsify(escore = "geometric", normalize = "none", filter = "threshold", umst = FALSE).

Usage

sparsify.with.geometric(U, s, class = "original", narrative = FALSE)

Arguments

U

An unweighted unipartite graph, as: (1) an adjacency matrix in the form of a matrix, sparse Matrix, or dataframe; (2) an edgelist in the form of a two-column matrix, sparse Matrix, or dataframe; (3) an igraph object; (4) a network object.

s

numeric: Sparsificiation threshold, 0 < s < 1; larger values yield sparser graphs

class

string: the class of the returned backbone graph, one of c("original", "matrix", "sparseMatrix", "igraph", "network", "edgelist"). If "original", the backbone graph returned is of the same class as U.

narrative

boolean: TRUE if suggested text & citations should be displayed.

Value

An unweighted, undirected, unipartite graph of class class.

References

Goldberg, D. S., & Roth, F. P. (2003). Assessing experimentally derived interactions in a small world. Proceedings of the National Academy of Sciences, 100, 4372-4376. 10.1073/pnas.0735871100

Examples

Run this code
# NOT RUN {
U <- igraph::sbm.game(60, matrix(c(.75,.25,.25,.25,.75,.25,.25,.25,.75),3,3), c(20,20,20))
plot(U) #A hairball
sparse <- sparsify.with.geometric(U, s = 0.25, narrative = TRUE)
plot(sparse) #Clearly visible communities
# }

Run the code above in your browser using DataLab