| as_igraph {rscc} | R Documentation | 
as.igraph
Description
Converts a data frame of similarity coefficients into a graph.
Usage
as_igraph(x, tol = 100 * .Machine$double.eps, tol1 = 8 * tol, ...)
Arguments
| x | a similarity object | 
| tol | numeric scalar >= 0.  Smaller differences are not
considered, see  | 
| tol1 | numeric scalar >= 0.   | 
| ... | further parameters used by igraph::graph_from_adjacency_matrix | 
Value
an igraph object
Examples
files <- list.files(path=system.file("examples", package="rscc"), pattern="*.R$", full.names = TRUE)
prgs  <- sourcecode(files, title=basename(files))
docs  <- documents(prgs)
simm  <- similarities(docs)
# a similarity coefficients equal to zero does not create an edge!
g <- as_igraph(simm, diag=FALSE)
# thicker edges have higher similarity coefficients
plot(g, edge.width=1+3*igraph::E(g)$weight)
[Package rscc version 0.2.1 Index]