% Generated by roxygen2: do not edit by hand % Please edit documentation in R/networkplot.R \name{networkplot} \alias{networkplot} \title{Network Plot} \usage{ networkplot(R, groups = NULL, group_label = NULL, title = NULL) } \arguments{ \item{R}{A square numeric matrix with names columns and rows} \item{groups}{Optional data.frame mapping nodes to groups} \item{group_label}{Optional string labeling the kind of grouping} \item{title}{Optional plot title} } \value{ A ggraph object } \description{ Draw an undirected graph from a square matrix where each variable is a node and the pairwise entries are the strength of the relationship (ex: correlation, partial correlation). Based on https://r-graph-gallery.com/310-custom-hierarchical-edge-bundling.html } \examples{ set.seed(1) X <- matrix(rnorm(100), ncol = 10) colnames(X) <- letters[1:10] R <- cor(X) networkplot(R, title = 'Networkplot without groups') groups <- data.frame( node = letters[1:10], group = c(rep('A', 5), rep('B', 5)) ) networkplot( R, groups = groups, group_label = 'Letter', title = 'Networkplot with groups' ) }