Description Usage Arguments Value See Also Examples
Extracts the path from the specified node to the root of the tree.
1 | getAncestryNode(indNode = integer(), tree = matrix())
|
indNode |
An |
tree |
A tree of a |
A numeric
vector. The names indicate the ancestor nodes, the values
the variables used to split the according node. First element of the vector
is the closest relative, the last element represents the root.
getAncestryTree
, getAncestryForest
1 2 3 4 5 6 7 8 9 | ## data
YX <- simulateSNPdata(seed = 123)
## forest
rF <- randomForest(x = YX[ , -1], y = YX[ , 1], keep.forest = TRUE,
keep.inbag = TRUE, importance = TRUE, ntree = 500)
## ancestry
getAncestryNode(indNode = 104, tree = getTree(rF, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.