... | ... |
@@ -101,6 +101,8 @@ ggtree <- function(tr, |
101 | 101 |
...) |
102 | 102 |
|
103 | 103 |
if (!is.null(dd)){ |
104 |
+ message_wrap("The tree object will be displayed with graph layout since |
|
105 |
+ layout argument was specified the graph layout function.") |
|
104 | 106 |
p$data <- dplyr::left_join( |
105 | 107 |
p$data %>% select(-c("x", "y")), |
106 | 108 |
dd, |
... | ... |
@@ -117,6 +117,17 @@ getCols <- function (n) { |
117 | 117 |
grDevices::colorRampPalette(col3)(n) |
118 | 118 |
} |
119 | 119 |
|
120 |
+message_wrap <- function(...){ |
|
121 |
+ msg <- .return_wrap(...) |
|
122 |
+ message(msg) |
|
123 |
+} |
|
124 |
+ |
|
125 |
+.return_wrap <- function(...){ |
|
126 |
+ msg <- paste(..., collapse = "", sep = "") |
|
127 |
+ wrapped <- strwrap(msg, width = getOption("width") - 2) %>% |
|
128 |
+ glue::glue_collapse(., "\n", last = "\n") |
|
129 |
+ wrapped |
|
130 |
+} |
|
120 | 131 |
|
121 | 132 |
## |
122 | 133 |
## |