condenseMatrixByColnames: Condense matrix by colnames

Description Usage Arguments Value Author(s) Examples

View source: R/condenseMatrixByColnames.R

Description

Condense matrix by colnames

Usage

1
condenseMatrixByColnames(mx, iname, sep = ";", cnt = FALSE)

Arguments

mx

a matrix to be condensed

iname

the name of the column to be condensed

sep

separator for condensed values,default ;

cnt

TRUE/FALSE specifying whether adding count column or not?

Value

dataframe of condensed matrix

Author(s)

Jianhong Ou, Lihua Julie Zhu

Examples

1
2
3
4
a<-matrix(c(rep(rep(1:5,2),2),rep(1:10,2)),ncol=4)
colnames(a)<-c("con.1","con.2","index.1","index.2")
condenseMatrixByColnames(a,"con.1")
condenseMatrixByColnames(a,2)

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.