subset_cheem {cheem} | R Documentation |
Subset a cheem list
Description
Given a numerical index of rownumbers of the original data, subset the correct elements of a cheem list.
Usage
subset_cheem(cheem_ls, rownumbers = 1:500)
Arguments
cheem_ls |
The return of a |
rownumbers |
A vector of the numeric index of rownumbers to keep.
To use a logical index, pass it to |
Value
A subset of the supplied cheem_ls.
See Also
Other cheem preprocessing:
cheem_ls()
Examples
library(cheem)
## Classification setup
X <- spinifex::penguins_na.rm[, 1:4]
Y <- spinifex::penguins_na.rm$species
clas <- spinifex::penguins_na.rm$species
## Cheem
peng_chm <- cheem_ls(X, Y, penguin_xgb_shap, penguin_xgb_pred, clas,
label = "Penguins, xgb, shapviz")
lapply(peng_chm, NROW)
## subset a cheem list
num_idx <- which(spinifex::penguins_na.rm$flipper_length_mm > 185)
peng_chm_sub <- subset_cheem(peng_chm, num_idx)
lapply(peng_chm_sub, NROW)
## Notice that $global_view_df and $decode_df have fewer rows.
[Package cheem version 0.4.0.0 Index]