Description Usage Arguments Details Value Examples
View source: R/fun-mask_values.R
Mask certain values in the screen object to be omitted in downstream analysis.
1 | mask_values(scr, cols, preds)
|
scr |
a |
cols |
character vector of column names to be masked |
preds |
logical predicate that will determine masking
or a list of such predicates of the same length as |
Selected values (observation-variable fields) can be replaced with NAs, so that they are omitted from normalization, standardization, and hit scoring.
A modified data.frame
where the masked values are set to NA
.
1 2 3 4 5 | Iris <- rbind(head(iris), tail(iris))
mask_values(Iris, "Sepal.Length", Species == "setosa")
mask_values(Iris, "Sepal.Length", "Species == \"setosa\"")
mask_values(Iris, c("Sepal.Length", "Sepal.Width"), Species == "setosa")
mask_values(Iris, c("Sepal.Length", "Sepal.Width"), list(Species == "setosa", Species == "virginica"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.