View source: R/ggparallel_specific_utils.R
count_edge_crossings | R Documentation |
Calculates the total number of edge crossings between two numeric vectors in a 2-column parallel coordinates setup. Each axis represents one of the columns.
count_edge_crossings(l, r)
l |
A numeric vector representing values on the left axis. Must have the
same length as |
r |
A numeric vector representing values on the right axis. Must have
the same length as |
An edge crossing occurs when two edges intersect between the axes.
Formally, edges (l[i], r[i])
and (l[j], r[j])
cross if
(l[i] - l[j]) * (r[i] - r[j]) < 0
.
An integer indicating the total number of edge crossings.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.