padMissingColWithNAs: Add padding between informative positions.

View source: R/preProcessMethMats.R

padMissingColWithNAsR Documentation

Add padding between informative positions.

Description

In order to combine matrices from different genes, the simple read x position matrix must be converted to a full matrix with a column for every position within the region, even if no CpG or GpC is found there in a particular gene. Any non-informative position gets the value "NA".

Usage

padMissingColWithNAs(mat, colRange = c(-250, 250))

Arguments

mat

A matrix of numbers and NAs.

colRange

a vector of two numbers for start and end positions used in the matrix (default=c(-250,250))

Value

A matrix with missing columns padded with NAs

Examples

m<-matrix(c(1:4),nrow=2,byrow=TRUE,dimnames=list(c("a","b"),c(-1,2)))
padMissingColWithNAs(m,colRange=c(-2,2))

jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.