sample_cells: Sample cells from a SingleCellExperiment

View source: R/utils_sampling.R

sample_cellsR Documentation

Sample cells from a SingleCellExperiment

Description

Sample n cells from a SingleCellExperiment object with no replacement.

Usage

sample_cells(x, n)

Arguments

x

the SingleCellExperiment object

n

the number of cells to sample

Value

SingleCellExperiment object

Examples

sample_sce_data <- readRDS(cellbench_file("celseq_sce_sample.rds"))
dim(sample_sce_data)
x <- sample_cells(sample_sce_data, 10)
dim(x)

Shians/CellBench documentation built on Oct. 16, 2023, 7:54 a.m.