extree_variable {partykitx} | R Documentation |
extree_data
object
extree_data
objects contain a lot of useful information. This convenience
function helps accessing them.
extree_variable(x, i, type = c("original", "index", "scores", "missings"))
x |
an object of class |
i |
extree data slot index. Can be a numeric vector or |
type |
type of variable version to return.
|
The selected information.
data("iris") ed <- extree_data(Species ~ Sepal.Width + Sepal.Length | Petal.Width + Petal.Length, data = iris, yx = "matrix") ### response extree_variable(ed, i = 1) extree_variable(ed, i = "yx") extree_variable(ed, i = "yx", type = "missings") ### covariates extree_variable(ed, i = 4) extree_variable(ed, i = 5, type = "index") extree_variable(ed, i = 5)[1:10] extree_variable(ed, i = c(2, 4))