list2edges {ontophylo} | R Documentation |
Convert list to edge matrix
Description
Takes a list of charater annotations and creates an edge matrix comprising two columns: from and to. The list to table conversion can be done using ldply function from plyr package: plyr::ldply(list, rbind).
Usage
list2edges(annotated.char.list, col_order_inverse = FALSE)
Arguments
annotated.char.list |
character list. A character list with ontology annotations. |
col_order_inverse |
logical. The default creates the first columns consisting of character IDs and the second columns consisting of ontology annotations. The inverse order changes the columns order. |
Value
Two-column matrix.
Author(s)
Sergei Tarasov
Examples
annot_list <- list("CH1" = c("HAO:0000933", "HAO:0000958"), "CH2" = c("HAO:0000833", "HAO:0000258"))
list2edges(annot_list)
[Package ontophylo version 1.1.3 Index]