findNodesToMerge: findNodesToMerge

View source: R/sankeydiagram.R

findNodesToMergeR Documentation

findNodesToMerge

Description

Identifies the pair of nodes to merge which will minimize distinct links. Note this uses the weights, so adding multiple small links may be preferred to adding a single heavy link. Note also that the link to the merged node i.e. (A,B+C) is the has a weight that is the sum of (A,B) and (A,C). The relative proportions are not taken into account.

Usage

findNodesToMerge(df, column, weights = NULL)

Arguments

df

dataframe containing factor variables only.

column

index of the column which we are looking to merge nodes for

weights

numeric vector containing weights for each row of df.


NumbersInternational/flipPlots documentation built on Feb. 26, 2024, 5:39 a.m.