Block.tree <- list(label = "W", Vertices = c("contry"),
X = list(Vertices = c("sex", "race"),
A = list(Vertices = c("hair", "eye"),
horizontal = FALSE),
B = list(Vertices = c("age"),
C = list(Vertices = c("education")))))
Names <- unlist(Block.tree)
Names <- Names[grep("Vertices", names(Names))]
Types <- rep("Discrete", length(Names))
vertices <- returnVertexList(Names, types = Types)
blocktree <- setTreeBlocks(Block.tree, vertices)
Labels(blockTreeToList(blocktree$BlockTree))
Run the code above in your browser using DataLab