Cell-to-sample mappings

cell2sample(object, ...)

# S4 method for SingleCellExperiment
cell2sample(object, return = c("factor",
  "tibble"))

Arguments

object

Object.

return

character(1). Return type. Uses match.arg() internally and defaults to the first argument in the character vector.

...

Additional arguments.

Value

  • "factor": Named factor containing as the levels and cell IDs as the names.

  • "tibble": tbl_df containing cellID and sampleID columns.

Note

sampleID column must be defined in colData().

Examples

data(sce, package = "acidtest") x <- cell2sample(sce) table(x)
#> x #> sample1 sample2 #> 55 45