Learn R Programming

DNAtools (version 0.2-4)

dbCollapse: Collapse m/p output to vector

Description

Collapse a m/p-matrix from dbCompare/dbExpect to a vector.

Usage

dbCollapse(x)

Arguments

x

Either a object of class 'dbcompare' (result from dbCompare) or 'matrix'.

Value

A vector of length 2*max(m)+1 with entries begin the sum of entries i in m/p-matrix satisfying i=2*m+p.

Details

Collapse a m/p-matrix from dbCompare/dbExpect to a vector with entry i being the sum of all entries from m/p-matrix satisfying 2*m+p=i.

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
  data(dbExample)
  res <- dbCompare(dbExample, hit=5, trace=TRUE)
  dbCollapse(res) ## same as dbCompare(dbExample, hit=5, trace=TRUE, collapse=TRUE)
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab