Learn R Programming

MAMA (version 1.0.2)

probs.to.matrix: Function to convert list to matrix

Description

Function converts list to binary matrix

Usage

probs.to.matrix(probs, genenames)

Arguments

probs
list of vectors of gene names/ character strings
genenames
vector of all gene names in analysis / all strings to be considered

Value

  • matrix in which rows refer to genes (character strings) and columns to slots of input list

See Also

metalist.to.matrix

Examples

Run this code
lists<-list(Method1=c("Gene_A", "Gene_V","Gene_S","Gene_C","Gene_U","Gene_D","Gene_E","Gene_G","Gene_W"), 
  Method2=c("Gene_D","Gene_W","Gene_G","Gene_E","Gene_H","Gene_X"),
  Method3=c("Gene_L","Gene_K","Gene_J","Gene_M","Gene_V","Gene_T","Gene_R","Gene_U"))
genes<-c("Gene_A", "Gene_V", "Gene_S", "Gene_C", "Gene_U", "Gene_D", "Gene_E", "Gene_G",
 "Gene_W", "Gene_H", "Gene_X", "Gene_L", "Gene_K", "Gene_J", "Gene_M", "Gene_T",
 "Gene_R")
PM<-probs.to.matrix(lists,genes)
PM

Run the code above in your browser using DataLab