I'm making a directed network in R studio with the igraph package. I would like to display two edges between nodes where applicable, both weighted, one for ins and one for outs. I'm very new to R and managed to get weighted edges that compile both ins and outs but would like them separated.
I've googled my problem with no avail, it might be from phrasing it wrong. I apologize in advance if I worded it badly.
EDIT: Minimal reproducible sample:
OPR.df <- data.frame("From" = c(c("8", "8", "8", "8", "7", "25", "24", "1A", "12", "12"),
c("12", "12", "12", "17", "17", "17"),
c("17", "17", "17", "17"),
c("17", "17", "17", "17", "17", "9A", "9", "17", "9", "17", "9"),
c("9", "17", "17", "17")),
"To" = c(c("8", "8", "8", "7", "25", "24", "1A", "12", "12", "12"),
c("12", "12", "17", "17", "17", "17"),
c("17", "17", "17", "17"),
c("17", "17", "17", "17", "9A", "9", "17", "9", "17", "9", "17"),
c("17", "17", "17", "17")))
opr.d <- graph_from_data_frame(d = OPR.df,
directed = T)
# I think this is the part where I set this??
E(opr.d)$weight <- 1
opr.sd <- simplify(opr.d,
remove.multiple = T,
remove.loops = F,
edge.attr.comb = c(weight = "sum",
type = "ignore"))
E(opr.sd)$width <- E(opr.sd)$weight/3