[.shapviz | R Documentation |
Use standard square bracket subsetting to select rows and/or columns of SHAP values, feature values, and SHAP interaction values of a "shapviz" object.
## S3 method for class 'shapviz'
x[i, j, ...]
x |
An object of class "shapviz". |
i |
Row subsetting. |
j |
Column subsetting. |
... |
Currently unused. |
A new object of class "shapviz".
shapviz()
S <- matrix(c(1, -1, -1, 1), ncol = 2, dimnames = list(NULL, c("x", "y")))
X <- data.frame(x = c("a", "b"), y = c(100, 10))
x <- shapviz(S, X, baseline = 4)
x[1, "x"]
x[1]
x[c(FALSE, TRUE), ]
x[, "x"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.