# NOT RUN {
## Rooted tree
df = data.frame(x = c("A", "A", "A", "A"),
y = c("B", "C", "C", "C"),
z = c("D", "E", "E", "F"),
stringsAsFactors = FALSE)
(as.rtree(df))
## Unrooted tree
df = data.frame(x = c("A", "A", "A", "X"),
y = c("B", "C", "C", "Y"),
z = c("D", "E", "E", "Z"),
stringsAsFactors = FALSE)
(as.rtree(df))
# }
Run the code above in your browser using DataLab