tt2matrix: Extracting data from a toptable and format it to matrix

Description Usage Arguments Value Author(s) Examples

View source: R/tt2matrix.R

Description

Given an dataframe with data, typically from the interactiontable, the gene pair data is converted to a symmetric matrix.

Usage

1
tt2matrix(toptable, what)

Arguments

toptable

a dataframe with data for the pairwise interactions. Typically from the interactiontable function.

what

character indicating which of the columns in the dataframe should be used in the matrix.

Value

a symmetric matrix with the selected data for gene pair i,j in matrix[i,j] and matrix[j,i]

Author(s)

Elin Axelsson

Examples

1
2
3
4
## simulated data
mytoptable = data.frame("ID" = c("A B", "A C", "B C"),"size"=c(1:3),stringsAsFactors=FALSE)
rownames(mytoptable) = mytoptable$ID
mat = tt2matrix(mytoptable,what="size")

coRNAi documentation built on Nov. 17, 2017, 11:14 a.m.