Create simple probability trees with ease. Intended for use with ggplot2, but can be used with other plotting systems too. You specify a set of nodes: the text content, and the parent node. (You can also specify the probability.) Ptree then computes the coordinates for laying out the tree's components: node-lables, connecting line segments, and (optionally) probabilities adorning those segments. A helper function can also do the work of drawing the tree for you, if you don't want to do the calls to ggplot2 yourself.
|Package repository||View on GitHub|
Install the latest version of this package by entering the following in R:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.