View source: R/summary.dpart.R
summary | R Documentation |
Outputs a detailed listing of the classification tree to file: tree_output.txt
summary(object, ...)
## S3 method for class 'dpart'
summary(object, cp = 0, digits = getOption("digits"),
file = "tree_output.txt", ...)
## S3 method for class 'rpart'
summary(object, cp = 0, digits = getOption("digits"),
file, ...)
object |
dpart object |
... |
additional arguments affecting the summary produced |
cp |
trim nodes with a complexity of less than cp from the listing. |
digits |
Number of significant digits to be used in the result. |
file |
write the output to a given file name. (Full listings of a tree are often quite long).
Default file name is |
This function is a method for the generic function summary for class dpart
.
It can be invoked by calling summary for an object of the appropriate class,
or directly by calling summary.dpart
regardless of the class of the object.
By default the summary is written to file.
summary
, dpart
, print.dpart
# Assigning prey colours for default palette
val <- apc(x = yftdiet, preyfile = PreyTaxonSort, check = TRUE)
node.colsY <- val$cols
dietPP <- val$x # updated diet matrix with Group assigned prey taxa codes
# Fitting the classification tree
yft.dp <- dpart(Group ~ Lat + Lon + Year + Quarter + SST + Length,
data = dietPP, weights = W, minsplit = 10,
cp = 0.001)
plot(yft.dp, node.cols = node.colsY)
summary(yft.dp)
#print(yft.dp, setID = "TripSetNo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.