Description Usage Arguments Examples
View source: R/circle_circle.R
calculate circle_circle layout manually
1 | circle_circle(layout, index = NULL)
|
layout |
a layout object |
index |
grouping |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | libray(tidygraph)
n <- 1000
microbiome <- data.frame(
otu = paste("OTU",1:n,sep="_"),
phylum = sample(paste("phylum",1:5,sep="_"),n,replace = T),
class = sample(paste("class",6:30,sep="_"),n,replace=T),
order = sample(paste("order",31:80,sep="_"),n,replace = T),
value = runif(n,min=1,max=1000)
)
index_micro <- c("phylum","class","order")
nodes_micro <- gather_graph_node(microbiome,index=index_micro, root="Bac")
edges_micro <- gather_graph_edge(microbiome,index=index_micro, root="Bac")
graph_micro <- tbl_graph(nodes_micro,edges_micro)
layout_micro <- create_layout(graph_micro,layout = "circle")
layout <- circle_circle(layout_micro,index=index_micro)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.