diff options
| author | Chris Sobczak <chris@sobczak.family> | 2026-06-12 19:06:04 -0700 |
|---|---|---|
| committer | Chris Sobczak <chris@sobczak.family> | 2026-06-12 19:06:04 -0700 |
| commit | e62e6df4c80037368526f45ee49a44e6e88cacb8 (patch) | |
| tree | c244faf9efcc89d38f3023caf9be8442e98e38f8 /man | |
| parent | 48fe2c177b746c4a4957f7aa6cbec1cb50cf22b4 (diff) | |
Add groupings to the network graph
Diffstat (limited to 'man')
| -rw-r--r-- | man/networkplot.Rd | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/man/networkplot.Rd b/man/networkplot.Rd index 055bc46..a4a622d 100644 --- a/man/networkplot.Rd +++ b/man/networkplot.Rd @@ -4,11 +4,13 @@ \alias{networkplot} \title{Network Plot} \usage{ -networkplot(R, title = NULL) +networkplot(R, groups = 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{title}{Optional plot title} } \value{ @@ -24,5 +26,11 @@ entries are the strength of the relationship X <- matrix(data = rnorm(100), nrow = 10) R <- cor(X) networkplot(R, title = 'Example Correlation Plot') +colnames(R) <- as.character(seq_len(ncol(R))) +g <- data.frame( +node = colnames(R), +group = rep(c('A', 'B'), length.out = ncol(R)) +) +networkplot(R, groups = g, title = 'Example Correlation Plot') } |
