summaryrefslogtreecommitdiff
path: root/R/networkplot.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/networkplot.R')
-rw-r--r--R/networkplot.R11
1 files changed, 8 insertions, 3 deletions
diff --git a/R/networkplot.R b/R/networkplot.R
index 61605d2..41669b0 100644
--- a/R/networkplot.R
+++ b/R/networkplot.R
@@ -16,7 +16,7 @@
#' @import ggraph
#' @import igraph
#'
-#' @example
+#' @examples
#' set.seed(1)
#' X <- matrix(rnorm(100), ncol = 10)
#' colnames(X) <- letters[1:10]
@@ -24,10 +24,15 @@
#' networkplot(R, title = 'Networkplot without groups')
#'
#' groups <- data.frame(
-#' node = letters[1:5],
+#' node = letters[1:10],
#' group = c(rep('A', 5), rep('B', 5))
#' )
-#' networkplot(R, groups = groups, group_label = 'Letter', title = 'Networkplot with groups')
+#' networkplot(
+#' R,
+#' groups = groups,
+#' group_label = 'Letter',
+#' title = 'Networkplot with groups'
+#' )
#'
#' @export
networkplot <- function(R, groups = NULL, group_label = NULL, title = NULL){