View source: R/filter_dataset.R
| remove_metadata_variables | R Documentation |
Removes metadata variables from a dataset.
remove_metadata_variables(dataset, variables.to.remove)
dataset |
Dataset to modify. |
variables.to.remove |
Metadata variables to remove. |
A dataset object with the same structure as the input, where the selected columns have been removed from 'dataset$metadata'. If no matching metadata fields are found, the dataset is returned unchanged and a warning is issued.
data <- matrix(
1:6,
nrow = 2,
dimnames = list(c("x1", "x2"), c("s1", "s2", "s3"))
)
metadata <- data.frame(
class = c("A", "B", "A"),
batch = c(1, 1, 2),
row.names = c("s1", "s2", "s3")
)
dataset <- list(data = data, metadata = metadata)
remove_metadata_variables(dataset, "batch")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.