copy.SDTree | R Documentation |
Returns a copy of the tree object. Might be useful if you want to keep the original tree in comparison to the pruned tree.
## S3 method for class 'SDTree'
copy(object, ...)
object |
an SDTree object |
... |
Further arguments passed to or from other methods. |
A copy of the SDTree object
Markus Ulmer
prune
set.seed(1)
X <- matrix(rnorm(10 * 20), nrow = 10)
Y <- rnorm(10)
fit <- SDTree(x = X, y = Y, cp = 0.5)
fit2 <- copy(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.