Learn R Programming

migraph (version 0.9.3)

layouts: Layouts for snapping layouts to a grid

Description

The function uses approximate pattern matching to redistribute coarse layouts on square grid points, while preserving the topological relationships among the nodes (see Inoue et al. 2012).

Usage

layout_tbl_graph_frgrid(object, circular = FALSE, times = 1000)

layout_tbl_graph_kkgrid(object, circular = FALSE, times = 1000)

layout_tbl_graph_gogrid(object, circular = FALSE, times = 1000)

Arguments

object

An object of a migraph-consistent class:

  • matrix, from base R

  • edgelist, a data frame from base R or tibble from tibble

  • igraph, from the igraph package

  • network, from the network package

  • tbl_graph, from the tidygraph package

circular

Should the layout be transformed into a radial representation. Only possible for some layouts. Defaults to FALSE

times

Maximum number of iterations, where appropriate

References

Inoue, Kentaro, Shinichi Shimozono, Hideaki Yoshida, and Hiroyuki Kurata. 2012. <U+201C>Application of Approximate Pattern Matching in Two Dimensional Spaces to Grid Layout for Biochemical Network Maps<U+201D> edited by J. Bourdon. PLoS ONE 7(6):e37739. https://doi.org/10.1371/journal.pone.0037739.

Examples

Run this code
# NOT RUN {
autographr(mpn_elite_mex, "frgrid")
autographr(mpn_ryanair, "frgrid")
autographr(mpn_elite_mex, "kkgrid")
autographr(mpn_ryanair, "kkgrid")
autographr(mpn_elite_mex, "gogrid")
autographr(mpn_ryanair, "gogrid")
# }

Run the code above in your browser using DataLab