greedy | R Documentation |
Greedy one-to-one matching of pairs
greedy(x, y, weight, n = 1L, m = 1L, include_ties = FALSE)
x |
id's of lhs of pairs; converted to integer |
y |
id's of rhs of pairs; converted to integer |
weight |
numeric vector with weight of pair |
n |
an integer. Each element of x can be linked to at most n elements of y. |
m |
an integer. Each element of y can be linked to at most m elements of x. |
include_ties |
when pairs for a given record have an equal weight, should all pairs be included. |
Pairs with the highest weight are selected as long a neither the lhs as the
rhs are already selected in a pair with a higher weight. When include_ties
is TRUE
all pairs are included when multiple pairs for a given record have
an equal weight.
A logical vector with the same length as x
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.