R/reverseEdgeDirections.R

Defines functions reverseEdgeDirections

Documented in reverseEdgeDirections

reverseEdgeDirections <- function(g) {
    ## FIXME: This needs to fix edge attributes, but for now, we punt
    ## and we are only using node attrs here anyhow...
    gam <- as(g, "graphAM")
    nodeNames <- nodes(g)
    gam@adjMat <- t(gam@adjMat)
    colnames(gam@adjMat) <- nodeNames
    as(gam, "graphNEL")
}
Bioconductor/graph documentation built on April 19, 2024, 9:32 a.m.