merge_list: Merging list

View source: R/merge_list.R

merge_listR Documentation

Merging list

Description

merge cluster into adjacent cluster if the merged cluster single cell number less than the cutoff.

Usage

merge_list(list,cutoff = 25)

Arguments

l

an list of cell numbers by clusters

ctf

cutoff for the cell number

Value

A list of indices of data and a list of names of data.

Examples

rm(list=ls());

library(scCorr);

## simulate data
set.seed(1234);
## length of list
list.l <- 50;
out.s  <- NULL;
for (i in 1:list.l){
  n          <- sample(1:50, 1);
  out.s[[i]] <- sample(1:100, n);
}
## check length
lengths(out.s);
out <- merge_list(out.s, cutoff=10)
## check output list lengths
lengths(out)
  

CBIIT-CGBB/scCorr documentation built on Dec. 11, 2023, 4 a.m.