merge_list | R Documentation |
merge cluster into adjacent cluster if the merged cluster single cell number less than the cutoff.
merge_list(list,cutoff = 25)
l |
an list of cell numbers by clusters |
ctf |
cutoff for the cell number |
A list of indices of data and a list of names of data.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.