mgGCluster: merge cluster

View source: R/mgGCluster.R

mgGClusterR Documentation

merge cluster

Description

merge cluster

Description

merge clusters given the merged cluster IDs.

Usage

  mgGCluster(x, l, rename=TRUE);

Arguments

x

vector as cluster ID

l

list, each object is vector. all clusters will be renamed as the first one

rename

if TRUE, the ID will be renamed.

Value

A list of merged result.

Examples

rm(list=ls());

library(scCorr);
## cluster matrix
cluf   <- "https://github.com/CBIIT-CGBB/scCorr/raw/master/data/01/03clust_table.txt";
clu    <- read.table(cluf, header=T, sep="\t");

## get one cluster result 
out    <- mgGCluster(clu[,23], list(c(9, 10), c(19, 20)), rename=F);
table(out$merged)
table(clu[,23]);


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