[.hstats_matrix {hstats}R Documentation

Subsets "hstats_matrix" Object

Description

Use standard square bracket subsetting to select rows and/or columns of statistics "M" (and "SE" in case of permutation importance statistics). Implies head() and tail().

Usage

## S3 method for class 'hstats_matrix'
x[i, j, ...]

Arguments

x

An object of class "hstats_matrix".

i

Row subsetting.

j

Column subsetting.

...

Currently unused.

Value

A new object of class "hstats_matrix".

Examples

fit <- lm(as.matrix(iris[1:2]) ~ Petal.Length + Petal.Width * Species, data = iris)
imp <- perm_importance(fit, X = iris, y = c("Sepal.Length", "Sepal.Width"))
head(imp, 1)
tail(imp, 2)
imp[1, "Sepal.Length"]
imp[1]
imp[, "Sepal.Width"]$SE
plot(imp[, "Sepal.Width"])

[Package hstats version 1.1.2 Index]