cart | R Documentation |
Classification And Regression Trees (CART) of basalts from ocean islands (OIB), mid-oceanic ridges (MORB) and island arcs (IAB).
cart(
dat,
option = 1,
type = c("class", "prob", "vector", "matrix"),
plot = FALSE,
...
)
dat |
a data frame or matrix with the following columns (missing data are allowed): If If If |
option |
numerical. If |
type |
character string denoting the type of predicted value returned. |
plot |
logical. If |
... |
optional arguments to |
If type="class"
: a factor of classifications based
on the responses.
If type="prob"
: a matrix of class probabilities.
If type="vector"
: vector of predicted responses.
If type="matrix"
: a matrix of the full responses, i.e. the
concatenation of at least the predicted class, the class counts at
that node in the fitted tree, and the class probabilities.
data(test,package='GeoplotR')
tree <- cart(test,option=1,plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.