Description Usage Arguments Value Examples
Converts a data frame of similarity coefficients into a graph.
1 |
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 |
an igraph object
1 2 3 4 5 6 7 8 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.