R Projects For Dummies by Joseph Schmuller

R Projects For Dummies by Joseph Schmuller

Author:Joseph Schmuller
Language: eng
Format: epub, pdf
ISBN: 9781119446170
Publisher: Wiley
Published: 2017-05-02T00:00:00+00:00


The first argument to prp() is the rpart object. That's the only argument that’s necessary. Think of the rpart object as a set of specifications for plotting the tree. I’ve added the other arguments to make the plot prettier:

type = 2 means “label all the nodes”

extra = “auto” tells prp() to include the information you see in each rounded rectangle that's in addition to the species name

nn = TRUE puts the node-number on each node

branch = 1 indicates the lines-with-corners style of branching shown in Figure 7-2. These are called “square-shouldered branches”, believe it or not. For slump-shouldered branches (I made that up) try a value between 0 and 1

varlen=0 produces the full variable names on all the nodes (instead of names truncated to 8 characters)

yesno=2 puts yes or no on all the appropriate branches (instead of just the ones descending from the root, which is the default). Note that each left branch is yes and each right branch is no



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.