From 83ce7994c64f598859386883f1523ea7179ecfe2 Mon Sep 17 00:00:00 2001 From: vcabeli Date: Fri, 4 Sep 2020 14:58:50 +0200 Subject: [PATCH] Added check for igraph correctly loading --- R/miic.export.R | 3 ++- man/miic.export.Rd | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/R/miic.export.R b/R/miic.export.R index 3560024..0c9577c 100755 --- a/R/miic.export.R +++ b/R/miic.export.R @@ -30,7 +30,7 @@ #' ) #' #' # Using igraph -#' library(igraph) +#' if(require(igraph)) { #' g = miic.export(miic.res, "igraph") #' plot(g) # Default visualisation, calls igraph::plot.igraph() #' @@ -41,6 +41,7 @@ #' # Override some graphical parameters #' plot(g, edge.curved = .2) #' plot(g, vertex.shape="none", edge.color="gray85", vertex.label.color="gray10") +#' } #' #' } #' diff --git a/man/miic.export.Rd b/man/miic.export.Rd index 136f530..7945853 100644 --- a/man/miic.export.Rd +++ b/man/miic.export.Rd @@ -36,7 +36,7 @@ miic.res <- miic( ) # Using igraph -library(igraph) +if(require(igraph)) { g = miic.export(miic.res, "igraph") plot(g) # Default visualisation, calls igraph::plot.igraph() @@ -47,6 +47,7 @@ plot(g, layout=l) # Override some graphical parameters plot(g, edge.curved = .2) plot(g, vertex.shape="none", edge.color="gray85", vertex.label.color="gray10") +} }