Learn R Programming

AllelicImbalance (version 1.10.2)

phaseMatrix2Array: phaseMatrix2Array

Description

used to convert the phase from the visually friendly matrix to array.

Usage

phaseMatrix2Array(x, ...)
"phaseMatrix2Array"(x, dimnames = NULL, ...)

Arguments

x
matrix see examples
...
arguments to forward to internal functions
dimnames
list with dimnames

Details

A more effectice way of store the phase data in the ASEset object

Examples

Run this code

#load data
data(ASEset) 
a <- ASEset

#example phase matrix 
p1 <- matrix(sample(c(1,0),replace=TRUE, size=nrow(a)*ncol(a)),nrow=nrow(a), ncol(a))
p2 <- matrix(sample(c(1,0),replace=TRUE, size=nrow(a)*ncol(a)),nrow=nrow(a), ncol(a))
p <- matrix(paste(p1,sample(c("|","|","/"), size=nrow(a)*ncol(a), replace=TRUE), p2, sep=""),
	nrow=nrow(a), ncol(a))

ar <- phaseMatrix2Array(p)

Run the code above in your browser using DataLab