Description Usage Arguments Value See Also Examples

Create the (symmetric) dataframe with the count of **common nodes** or **common edges** (see `list_compar`

for comparison criteria) for each pair of decorations (graphs) from a list. The diagonal of the symmetric dataframe is filled with counts of nodes/edges for each decoration.

1 2 | ```
same_elements(lgrph, nd.var = "type",
focus = "nodes")
``` |

`lgrph` |
A list of any number of graphs to be pairwise compared. The list can
be typically obtained with the function |

`nd.var` |
An attribute of the graph vertices containing the node variable (ie, field)
on which the comparison will be done. By default |

`focus` |
Either |

A symmetric matrix with the counts of the pairwise coincidences of nodes or edges. The matrix has as row and column names the names of the corresponding graphs in the input list.

`list_dec`

,
`list_compar`

,
`plot_compar`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
# read imgs, nodes and edges dataframes
imgs <- read.table(system.file("extdata", "imgs.tsv", package = "iconr"),
sep="\t",stringsAsFactors = FALSE)
nodes <- read.table(system.file("extdata", "nodes.tsv", package = "iconr"),
sep="\t",stringsAsFactors = FALSE)
edges <- read.table(system.file("extdata", "edges.tsv", package = "iconr"),
sep="\t",stringsAsFactors = FALSE)
lgrph <- list_dec(imgs,nodes,edges)
# Counting same nodes
df.same_nodes <- same_elements(lgrph, nd.var = "type",
focus = "nodes")
df.same_nodes
## a symmetric matrix of nodes comparisons
# same edges
df.same_edges <- same_elements(lgrph, nd.var = "type",
focus = "edges")
df.same_edges
## a symmetric matrix of edges comparisons
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.