View source: R/sankeydiagram.R
findNodesToMerge | R Documentation |
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.
findNodesToMerge(df, column, weights = NULL)
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.