I have a data.frame object like:

> data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd'))
  x  y
1 A Ab
2 A Ac
3 B Ba
4 B Bd

how could I create a tree structure object like this:
     |---Ab
 A---|
_|   |---Ac
 |
 |   |---Ba
 B---|
     |---Bb

Thanks,
Zech

	[[alternative HTML version deleted]]

