View source: R/filter_dataset.R
| remove_data_variables | R Documentation |
Removes x variables from a dataset.
remove_data_variables(dataset, variables.to.remove, by.index = FALSE)
dataset |
Dataset to modify. |
variables.to.remove |
Variables to remove. |
by.index |
Logical. If TRUE, variables.to.remove are indexes. |
A dataset object with the same structure as the input, where the selected rows of 'dataset$data' have been removed. If no matching variables are found, the input dataset is returned unchanged and a warning is issued.
data <- matrix(
1:9,
nrow = 3,
dimnames = list(c("10", "20", "30"), c("s1", "s2", "s3"))
)
metadata <- data.frame(class = c("A", "B", "A"), row.names = c("s1", "s2", "s3"))
dataset <- list(data = data, metadata = metadata)
remove_data_variables(dataset, "20")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.