You can also run easylayout as a standalone function, attributing its output to a variable in your R environment. The output is just a 2-column matrix:
Once you store the final coordinates to a variable, use any plotting package to display the network. In the example below, we plot the network using ggraph.
Future work
diff --git a/pkgdown.yml b/pkgdown.yml
index ff09885..42701ee 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -2,7 +2,7 @@ pandoc: 3.1.11
pkgdown: 2.1.1
pkgdown_sha: ~
articles: {}
-last_built: 2024-10-11T06:15Z
+last_built: 2024-12-03T15:43Z
urls:
reference: https://dalmolingroup.github.io/easylayout/reference
article: https://dalmolingroup.github.io/easylayout/articles
diff --git a/reference/easylayout-package.html b/reference/easylayout-package.html
index 68bf763..3e78922 100644
--- a/reference/easylayout-package.html
+++ b/reference/easylayout-package.html
@@ -1,5 +1,5 @@
-easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package • easylayouteasylayout: Publication-Ready Networks Directly in your IDE — easylayout-package • easylayoutLayout an igraph object using easylayout's web application. — easylayout • easylayoutLayout an igraph object using easylayout's web application. — easylayout • easylayoutPackage index • easylayout
+Package index • easylayoutSkip to contents
diff --git a/search.json b/search.json
index cf29c8e..bd40206 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://dalmolingroup.github.io/easylayout/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 easylayout authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Danilo Imparato. Author, maintainer.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Imparato D (2024). easylayout: R package interactive force-directed layouts within RStudio. R package version 0.0.0.9000, https://dalmolingroup.github.io/easylayout/.","code":"@Manual{, title = {easylayout: An R package for interactive force-directed layouts within RStudio}, author = {Danilo Imparato}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://dalmolingroup.github.io/easylayout/}, }"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"easylayout-an-r-package-for-interactive-force-directed-layouts-within-rstudio-","dir":"","previous_headings":"","what":"An R package for interactive force-directed layouts within RStudio","title":"An R package for interactive force-directed layouts within RStudio","text":"easylayout R package leverages interactive force simulations within IDE (e.g., RStudio, VSCode). yet another visualization library, instead aims interconnect existing libraries streamline usage R ecosystem. easylayout takes igraph object serializes web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. implementation aims performance, even lower-end devices able work relatively large networks. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package for interactive force-directed layouts within RStudio","text":"can install development version easylayout GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"dalmolingroup/easylayout\")"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"An R package for interactive force-directed layouts within RStudio","text":"basic example shows solve common problem:","code":"library(easylayout) library(igraph) g <- igraph::erdos.renyi.game(n = 5000, p.or.m = 10000, type = \"gnm\") number_of_vertices <- igraph::vcount(g) igraph::V(g)$label <- NA igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE) igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE) plot(g, layout = easylayout, vertex.label = NA, margin = 0)"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"future-work","dir":"","previous_headings":"","what":"Future work","title":"An R package for interactive force-directed layouts within RStudio","text":"current implementation focuses R ecosystem, using web technologies makes easily portable similar environments, like Jupyter Notebooks. expect tool reduce time spent tweaking network layouts, allowing researches generate compelling figures.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout-package.html","id":null,"dir":"Reference","previous_headings":"","what":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","title":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","text":"easylayout package seamlessly bridges manipulation visualization leveraging user’s IDE (e.g., RStudio, VSCode). yet another visualization library, instead aims interconnect existing libraries streamline usage R ecosystem. Easylayout takes igraph object serializes web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. implementation aims performance, even lower-end devices able work relatively large networks. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":[]},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","text":"Maintainer: Danilo Imparato first.last@example.com (ORCID)","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout an igraph object using easylayout's web application. — easylayout","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"easylayout function takes igraph object serializes` web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"","code":"easylayout(graph, layout = NULL, precompute = TRUE)"},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"graph igraph object representing network laid . layout Optional initial layout supplied user. precompute Whether skip precomputing initial layout.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"two column matrix XY coordinates N rows, N number vertices graph.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"","code":"if (FALSE) { # \\dontrun{ library(igraph) g <- make_ring(10) g <- easylayout(g) plot(g) } # }"}]
+[{"path":"https://dalmolingroup.github.io/easylayout/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 easylayout authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Danilo Imparato. Author, maintainer.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Imparato D (2024). easylayout: R package interactive force-directed layouts within RStudio. R package version 0.0.0.9000, https://dalmolingroup.github.io/easylayout/.","code":"@Manual{, title = {easylayout: An R package for interactive force-directed layouts within RStudio}, author = {Danilo Imparato}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://dalmolingroup.github.io/easylayout/}, }"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"easylayout-an-r-package-for-interactive-force-directed-layouts-within-rstudio-","dir":"","previous_headings":"","what":"An R package for interactive force-directed layouts within RStudio","title":"An R package for interactive force-directed layouts within RStudio","text":"easylayout R package leverages interactive force simulations within IDE (e.g., RStudio, VSCode). yet another visualization library, instead aims interconnect existing libraries streamline usage R ecosystem. easylayout takes igraph object serializes web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. implementation aims performance, even lower-end devices able work relatively large networks. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package for interactive force-directed layouts within RStudio","text":"can install development version easylayout GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"dalmolingroup/easylayout\")"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"An R package for interactive force-directed layouts within RStudio","text":"basic example shows solve common problem: can also run easylayout standalone function, attributing output variable R environment. output just 2-column matrix: store final coordinates variable, use plotting package display network. example , plot network using ggraph.","code":"library(easylayout) library(igraph) g <- igraph::erdos.renyi.game(n = 5000, p.or.m = 10000, type = \"gnm\") number_of_vertices <- igraph::vcount(g) igraph::V(g)$label <- NA igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE) igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE) plot(g, layout = easylayout, vertex.label = NA, margin = 0) layout <- easylayout(g) ggraph::ggraph(g, layout = layout) + ggraph::geom_edge_link() + ggraph::geom_node_point(aes(color = color)) + ggplot2::coord_fixed() + ggplot2::theme_void()"},{"path":"https://dalmolingroup.github.io/easylayout/index.html","id":"future-work","dir":"","previous_headings":"","what":"Future work","title":"An R package for interactive force-directed layouts within RStudio","text":"current implementation focuses R ecosystem, using web technologies makes easily portable similar environments, like Jupyter Notebooks. expect tool reduce time spent tweaking network layouts, allowing researches generate compelling figures.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout-package.html","id":null,"dir":"Reference","previous_headings":"","what":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","title":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","text":"easylayout package seamlessly bridges manipulation visualization leveraging user’s IDE (e.g., RStudio, VSCode). yet another visualization library, instead aims interconnect existing libraries streamline usage R ecosystem. Easylayout takes igraph object serializes web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. implementation aims performance, even lower-end devices able work relatively large networks. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":[]},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"easylayout: Publication-Ready Networks Directly in your IDE — easylayout-package","text":"Maintainer: Danilo Imparato first.last@example.com (ORCID)","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout an igraph object using easylayout's web application. — easylayout","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"easylayout function takes igraph object serializes` web application integrated IDE’s interface Shiny server. web application lays network simulating attraction repulsion forces. Simulation parameters can adjusted real-time. editing mode allows moving rotating nodes. user finishes tinkering layout, sent back R session plotted popular libraries like ggplot2 even base package .","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"","code":"easylayout(graph, layout = NULL, precompute = TRUE)"},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"graph igraph object representing network laid . layout Optional initial layout supplied user. precompute Whether skip precomputing initial layout.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"two column matrix XY coordinates N rows, N number vertices graph.","code":""},{"path":"https://dalmolingroup.github.io/easylayout/reference/easylayout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Layout an igraph object using easylayout's web application. — easylayout","text":"","code":"if (FALSE) { # \\dontrun{ library(igraph) g <- make_ring(10) g <- easylayout(g) plot(g) } # }"}]