Browse code

fortify for tree graph

Guangchuang Yu authored on 28/09/2019 09:25:27
Showing 4 changed files

... ...
@@ -6,6 +6,7 @@ S3method(fortify,agnes)
6 6
 S3method(fortify,dendrogram)
7 7
 S3method(fortify,diana)
8 8
 S3method(fortify,hclust)
9
+S3method(fortify,igraph)
9 10
 S3method(fortify,multiPhylo)
10 11
 S3method(fortify,obkData)
11 12
 S3method(fortify,phylo)
... ...
@@ -1,5 +1,6 @@
1 1
 # ggtree 1.99.1
2 2
 
3
++ `fortify` method for igraph (only work with tree graph) (2019-09-28, Sat)
3 4
 + `ggdensitree` (2019-09-11, Wed)
4 5
   - <https://github.com/YuLab-SMU/ggtree/pull/253>
5 6
   - <https://github.com/YuLab-SMU/ggtree/pull/255> 
... ...
@@ -161,6 +161,11 @@ fortify.twins <- fortify.phylo4
161 161
 ##' @export
162 162
 fortify.phylog <- fortify.phylo4
163 163
 
164
+##' @method fortify igraph
165
+##' @export
166
+fortify.igraph <- fortify.phylo4
167
+
168
+
164 169
 ##' @method fortify phylo4d
165 170
 ##' @importFrom treeio as.treedata
166 171
 ##' @export
... ...
@@ -176,6 +181,7 @@ fortify.phylo4d <- function(model, data,
176 181
 }
177 182
 
178 183
 
184
+
179 185
 ##' @method fortify obkData
180 186
 ##' @export
181 187
 fortify.obkData <- function(model, data,
182 188
deleted file mode 100644
... ...
@@ -1,5 +0,0 @@
1
-
2
-as.phylo.igraph(x) {
3
-    edge <- get.edgelist(x)
4
-    
5
-}