Skip to content

Commit

Permalink
remove ggraph suggest
Browse files Browse the repository at this point in the history
  • Loading branch information
yonicd committed Nov 27, 2017
1 parent c6d8138 commit 51c802c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Imports:
stats,
miniUI
Suggests:
ggraph,
testthat,
covr
License: GPL-2 | GPL-3
Expand Down
8 changes: 4 additions & 4 deletions R/cloneLayer.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ cloneLayer <- function(l, verbose=FALSE, showDefaults=TRUE) {
x$params <- x$params[!duplicated(names(x$params))]
x$geom_params <- x$aes_params <- x$stat_params <- NULL

if (typeof(x$data) == "closure") {
requireNamespace("ggraph")
x$data <- ggraph::get_edges()
}
# if (typeof(x$data) == "closure") {
# requireNamespace("ggraph")
# x$data <- ggraph::get_edges()
# }

if (verbose) {
nm <- names(x)
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build_map <- function(y) {
if (is.null(y)) out <- paste(item, "NULL", sep = "=")
if (inherits(y, c("function", "call", "ggproto"))) out <- paste0(item, "=", paste(utils::capture.output(dput(y)), collapse = "\n"))
if (inherits(y, c("data.frame"))) out <- paste0("=", paste(utils::capture.output(dput(y)), collapse = "\n"))
if (inherits(y, c("ggproto_method"))) out <- paste0("=ggraph::get_edges(edges='short')")
#if (inherits(y, c("ggproto_method"))) out <- paste0("=ggraph::get_edges(edges='short')")
if (out == "") out <- paste(item, y, sep = "=")
return(out)
}
Expand Down

0 comments on commit 51c802c

Please sign in to comment.