View source: R/filter_dataset.R
| subset_metadata | R Documentation |
Selects metadata variables to keep.
subset_metadata(dataset, variables)
dataset |
Dataset to subset. |
variables |
Metadata variables to keep. |
A dataset object with the same structure as the input, where 'dataset$metadata' contains only the selected metadata variables.
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)
subset_metadata(dataset, "class")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.