View source: R/Seurat.Utils.Metadata.R
getMetadataColumn | R Documentation |
Retrieves a specified metadata column from a Seurat object and returns it as a named vector.
getMetadataColumn(col = "batch", obj = combined.obj, as_numeric = FALSE)
col |
A string specifying the name of the metadata column to be retrieved. Default: 'batch'. |
obj |
A Seurat object from which the metadata column will be retrieved. Default: combined.obj. |
as_numeric |
A logical flag indicating whether the returned values should be converted to numeric format. Default: |
A named vector containing the values from the specified metadata column. If 'as_numeric' is TRUE, the values are converted to numeric format.
## Not run:
if (interactive()) {
# Example usage:
batch_metadata <- getMetadataColumn(col = "batch", obj = combined.obj, as_numeric = TRUE)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.