Skip to contents

Convert compare.layouts() output into a gripui_project

Usage

gripui_project_from_compare(
  compare_obj,
  graph = NULL,
  vertex_data = NULL,
  graph_info = NULL,
  title = NULL
)

Arguments

compare_obj

Result of compare.layouts().

graph

Optional graph object, named graph list, or path to a graph RDS. Defaults to NULL when only catalog exploration is needed.

vertex_data

Optional vertex metadata added to graph.

graph_info

Optional graph-level metadata added to graph.

title

Optional project title.

Value

A gripui_project.

Examples

edges <- edges.path(5)
cmp <- compare.layouts(
  edges = edges,
  n = 5,
  candidates = "default",
  seeds = 1L,
  return.layouts = TRUE
)
graph <- list(
  adj_list = list(2L, c(1L, 3L), c(2L, 4L), c(3L, 5L), 4L)
)
project <- gripui_project_from_compare(cmp, graph = graph, title = "Path compare")
nrow(project$layouts)
#> [1] 1