matrixE.old: Load a Matrix Expands and aligns the matrices This function...

Description Usage Arguments Details Value

View source: R/functions.R

Description

Load a Matrix Expands and aligns the matrices This function loads a file as a matrix. It assumes that the first column contains the rownames and the subsequent columns are the sample identifiers. Any rows with duplicated row names will be dropped with the first one being kepted.

Usage

1
matrixE.old(n, input, pres, minbinL, dimZ)

Arguments

infile

Path to the input file

Details

matrixE <- function(n,input,pres,minbinL,dimZ) {

t <- sparseMatrix(i=input[,1]+pres-minbinL+1, j=input[,2]+pres-minbinL+1, x=input[,3],symmetric=T,dims=c(dimZ, dimZ)-1)

o = as.data.frame(as.matrix(t))

o[ o ==0] = NA

kPlot <- matrix.sparse(o)

output=list(o,kPlot)

return(output)

}

Value

A matrix of the infile


gb305/Rpackages documentation built on Feb. 18, 2020, 2:55 p.m.