R/weight.R

Defines functions net_weight

Documented in net_weight

#' This function takes a network and removes weight and/or directionality of the network
#'
#' @param network Network to modify.
#' @param weight_rm Columns from network specifying weights ('mor').
#' @return Modified network.
#'
#' @import dplyr
#'
#' @export
net_weight <- function(network, weight_rm='mor'){
 network %>% mutate_at(weight_rm, function(x) replace(x, TRUE, 1))
}
saezlab/decoupleRBench documentation built on March 20, 2022, 3:02 p.m.