rk.network.graphs brings powerful network analysis and visualization to the RKWard GUI. Built on top of the robust igraph, IRanges, and rgexf packages, this plugin suite bridges the gap between qualitative coding software (like QualCoder), raw adjacency matrices, and professional network visualization tools (like Gephi).
Create, highlight, and batch-export complex networks in high definition without writing any R code.
This is the initial release of the package, introducing three core components designed for network creation and aesthetic customization:
- Ranges to Network: Specifically designed for Qualitative Data Analysis (e.g., QualCoder). It takes coded text segments (start/end indices) and automatically finds overlaps to build a code co-occurrence network.
- Matrix to Network: Converts standard adjacency or co-occurrence data frames (e.g., imported from Excel or CSV) into fully weighted and directed/undirected
igraphobjects. - Export Networks: A powerful batch-processing tool that takes an
igraphobject (or a List of them) and instantly exports them to.gexf(for Gephi) or high-res images (PNG, PDF, SVG).
The interface is fully localized in:
- 🇺🇸 English (Default)
- 🇪🇸 Spanish (
es) - 🇫🇷 French (
fr) - 🇩🇪 German (
de) - 🇧🇷 Portuguese (Brazil) (
pt_BR)
- Smart Highlighting: Stop presenting chaotic, multi-colored "hairball" networks. Apply a muted base color (like SWD Light Gray) to your entire graph, and automatically highlight key nodes and their text labels in bold SWD Orange, Blue, or Red by simply typing their names.
- Algorithmic Layouts: Choose from 9 different distribution algorithms (Fruchterman-Reingold, Kamada-Kawai, Circle, Star, MDS, etc.) directly from a dropdown menu.
- Easily process generic Excel matrices. Tell the plugin if your first column contains the node names, whether to include diagonals (self-loops), and whether the graph is weighted or directed. Node sizes and edge widths are automatically scaled based on connection strength.
- Gephi Ready: Automatically export your networks to the
.gexfformat to perform advanced modularity and community detection in Gephi. - Publication-Ready Images: Export directly to vector (
.pdf,.svg) or raster (.png) formats with full control over dimensions (pixels) and resolution (DPI).
This plugin is not yet on CRAN. To install it, use the remotes or devtools package in RKWard.
Important: This plugin requires IRanges, a Bioconductor package.
-
Open RKWard.
-
Run the following commands in the R Console:
# Install IRanges from Bioconductor if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("IRanges") # Install the plugin local({ require(devtools) install_github("AlfCano/rk.network.graphs", force = TRUE) })
-
Restart RKWard to load the new menu entries.
Once installed, the tools are located under the graphics menu:
Plots -> Network Graphs
You can test the Matrix to Network and Export features immediately by generating a dummy co-occurrence matrix in RKWard. Copy and paste this into your console:
# Create a dummy co-occurrence matrix
mat <- matrix(c(0, 5, 2, 1,
5, 0, 8, 0,
2, 8, 0, 3,
1, 0, 3, 0), nrow=4)
colnames(mat) <- rownames(mat) <- c("Policy", "Economy", "Health", "Education")
# Convert to dataframe for the plugin
dummy_matrix <- as.data.frame(mat)
dummy_matrix <- cbind(Node = rownames(dummy_matrix), dummy_matrix)
rownames(dummy_matrix) <- NULL- Go to Plots -> Network Graphs -> Matrix to Network.
- Input & Options tab: Select
dummy_matrix. Ensure "First column contains Node Names" and "Weighted Graph" are checked. - Aesthetics tab:
- Change Plot Layout to Kamada-Kawai.
- In Nodes to Highlight, type:
Economy - Set Base Color to SWD Light Gray and Highlight Color to SWD Orange.
- Graphics Device tab: Click Preview. Notice how "Economy" pops out beautifully against the gray network!
- Click Submit to save
net_graph_adjto your workspace.
- Go to Plots -> Network Graphs -> Export Networks.
- Select
net_graph_adjas your Target object. - Choose an output directory (e.g., your Desktop) and name it
my_network. - Ensure both Export as GEXF and Export as Image (PNG) are checked.
- Click Submit. You now have a publication-ready image and a Gephi-ready data file saved on your computer!
This plugin relies on the following R packages:
igraph(Core network generation and plotting)IRanges(Overlap calculation for text coding)rgexf(Gephi export capabilities)rkwarddev(Plugin generation)
- Author: Alfonso Cano (alfonso.cano@correo.buap.mx)
- Assisted by: Gemini, a large language model from Google.
- License: GPL (>= 3)