scale_graph: Scale weights

View source: R/scale_graph.R

scale_graphR Documentation

Scale weights

Description

First try to linearize the weights with the best logarithmic and polynomial, then perform exponential scaling and set upper and lower bounds.

Usage

scale_graph(
  weights,
  exp_scale = exp(1),
  upper_bound_mult = 25,
  lower_bound_const = 5
)

Arguments

weights

Either nodes or links weights vector

exp_scale

Scale for exponential transform

upper_bound_mult

Constant to multiply weights by after scaling. Use to set an upper bound for weights.

lower_bound_const

Constant to set a lower bound for weights. All weights below will be set to lower bound.

Value

Weights vector


sgraph documentation built on Sept. 12, 2024, 7:06 a.m.