A tree graph is a network structure. It is constituted of a root node that gives birth to several nodes connected by edges or branches.
{ "x" : { "Annot1" : ["A","B","C","A","B","C","A","B","C","A","B","C","A","B","C","A"], "Annot2" : [5,10,15,20,25,30,35,40,40,35,30,25,20,15,10,5], "Level1" : ["L1.1","L1.1","L1.1","L1.1","L1.2","L1.2","L1.2","L1.2","L1.3","L1.3","L1.3","L1.3","L1.4","L1.4","L1.4","L1.4"], "Level2" : ["L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2"], "Level3" : ["L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2"] }, "y" : { "data" : [ [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] ], "smps" : ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"], "vars" : ["Order"] } }
{ "graphType":"Tree", "hierarchy":[ "Level1", "Level2", "Level3" ], "showTransition":"true", "title":"Collapsible Tree" }
library(canvasXpress) y=read.table("https://www.canvasxpress.org/data/cX-tree-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE) x=read.table("https://www.canvasxpress.org/data/cX-tree-smp.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE) canvasXpress( data=y, smpAnnot=x, graphType="Tree", hierarchy=list("Level1", "Level2", "Level3"), showTransition=TRUE, title="Collapsible Tree" )
Create New Page