Garphield for R
garphieldr turns igraph objects and node/edge data frames into .gph
projects and displays them as interactive widgets.
Install
Section titled “Install”install.packages("garphieldr")Open a graph
Section titled “Open a graph”library(garphieldr)library(igraph)
project <- garphield_project(make_ring(12))garphield(project)plot(project) opens the same widget. To start from tables, pass edges and
nodes to garphield_project().
Choose UI components
Section titled “Choose UI components”The widget includes the minimap and interaction toolbar. Keep either one on its own when the graph sits inside a report:
garphield(project, chrome = "minimap")Write an interactive HTML file from the same project:
save_garphield_html(project, "network.html", chrome = "minimap")Read next
Section titled “Read next”- igraph and data frames
- RStudio, Quarto, and R Markdown
- Shiny
- Projects and fingerprints
- Tutorial: igraph to Quarto and Shiny - one network from RStudio through a Quarto page to a live Shiny app.