random_cells: Randomly sample cells (columns)

View source: R/RandomCells.R

random_cellsR Documentation

Randomly sample cells (columns)

Description

This function takes a matrix or data frame as input and randomly samples columns

Usage

random_cells(df, n)

Arguments

df

Data frame or matrix.

n

Number of cells to sample.

Value

Matrix or data frame of n randomly sampled rows

Examples

## Not run: 
df <- matrix(1:1000, 500, 20)
sub_df <- random_cells(
    df = df,
    n = 20
)

## End(Not run)

jackbibby1/SCPA documentation built on May 14, 2024, 7:16 a.m.