diff options
| -rw-r--r-- | R/networkplot.R | 14 | ||||
| -rw-r--r-- | man/networkplot.Rd | 12 |
2 files changed, 1 insertions, 25 deletions
diff --git a/R/networkplot.R b/R/networkplot.R index 9d251ea..10dfc01 100644 --- a/R/networkplot.R +++ b/R/networkplot.R @@ -14,17 +14,6 @@ #' #' @return A ggraph object #' -#' @examples -#' 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') -#' #' @import ggraph #' @import igraph #' @@ -152,8 +141,7 @@ networkplot <- function(R, groups = NULL, group_label = NULL, title = NULL, r_la high = 'blue', midpoint = 0, limits = c(-1, 1), - name = r_label, - guide = ggplot2::guide_colourbar() + name = r_label ) + # operates on node data from the layout # leaf is a logical vector (provided by the ggraph object g) diff --git a/man/networkplot.Rd b/man/networkplot.Rd index c0a0a3e..12e5363 100644 --- a/man/networkplot.Rd +++ b/man/networkplot.Rd @@ -33,15 +33,3 @@ 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{ -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') - -} |
