# NOT RUN {
# Read data
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)
# Generate list of graphs from the three data.frames
lgrph <- list_dec(imgs, nodes, edges)
# Generate list of all graph comparisons depending on the node "type" variable
g.compar <- list_compar(lgrph, nd.var = "type")
length(g.compar)
## Ten pairwise comparisons
# Inspect the second pairwise comparison of the list
g.compar[[2]]
## The two compared graphs with the name of the comparison variable
# Inspecting nodes:
igraph::as_data_frame(g.compar[[2]][[1]], "vertices")
## Vertices from the first decoration graph
igraph::as_data_frame(g.compar[[2]][[2]], "vertices")
## Vertices from the second decoration graph
# Inspecting edges:
igraph::as_data_frame(g.compar[[2]][[1]])
## Edges of the first decoration graph
igraph::as_data_frame(g.compar[[2]][[2]])
## Edges of the second decoration graph
# }
Run the code above in your browser using DataLab