isMeta {dittoSeq} | R Documentation |
Tests if an input is the name of a meta.data slot in a target object.
isMeta(test, object, return.values = FALSE)
test |
String or vector of strings, the "potential.metadata.name"(s) to check for. |
object |
A Seurat, SingleCellExperiment, or SummarizedExperiment object. |
return.values |
Logical which sets whether the function returns a logical |
For Seurat objects, also returns TRUE for the input "ident"
because, for all dittoSeq visualiztions, "ident"
will retrieve a Seurat objects' clustering slot.
Returns a logical or logical vector indicating whether each instance in test
is a meta.data slot within the object
.
Alternatively, returns the values of test
that were indeed metadata slots if return.values = TRUE
.
Daniel Bunis
getMetas
for returning all metadata slots of an object
meta
for obtaining the contants of metadata slots
example(importDittoBulk, echo = FALSE) # To check if something is a metadata slot isMeta("timepoint", object = myRNA) # FTRUE isMeta("nCount_RNA", object = myRNA) # FALSE # To test if many things are metadata of an object isMeta(c("age","groups"), myRNA) # FALSE, TRUE # 'return.values' input is especially useful in these cases. isMeta(c("age","groups"), myRNA, return.values = TRUE) # Alternatively, to see all metadata slots of an object, use getMetas getMetas(myRNA)