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")
}
vjcitn/graph documentation built on Dec. 23, 2021, 4:06 p.m.