View source: R/Seurat.Utils.Metadata.R
get_levels_seu | R Documentation |
This function extracts the unique levels present in the 'ident' slot of a Seurat object. The function throws an error if the number of levels exceeds 'max_levels'. The function optionally prints the R code to recreate the 'Levels' vector using 'dput'.
get_levels_seu(obj, ident, max_levels = 100, dput = TRUE)
obj |
A Seurat object. |
ident |
A character string representing the name of the slot in the Seurat object. |
max_levels |
An integer that sets the maximum number of levels allowed. Default is 100. |
dput |
A logical that decides whether to print the R code to recreate the 'Levels' vector. Default is TRUE. |
A vector of unique levels present in the 'ident' slot of the Seurat object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.