nonbimatch: Nonbipartite Matching

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The nonbinmatch function creates the set of pairwise matches that minimizes the sum of distances between the pairs.

Usage

1
nonbimatch(mdm, threshold = NA, precision = 6, ...)

Arguments

mdm

A distancematrix object. See the distancematrix function.

threshold

An numeric value, indicating the distance needed to create chameleon matches.

precision

The largest value in the matrix will have at most this many digits. The default value is six.

...

Additional arguments, these are not used.

Details

The nonbinmatch function calls the Fortran code (Derigs) and set of pairwise matches that minimizes the sum of distances between the pairs.

Value

nonbimatch S4 object with several elements

matches

data.frame containing matches

halves

data.frame containing each match

total

sum of the distances across all pairs

mean

mean distance for each pair

Author(s)

Cole Beck

See Also

distancematrix

Examples

1
2
3
4
5
6
plainmatrix<-as.matrix(dist(sample(1:25, 8, replace=TRUE)))
diag(plainmatrix) <- 99999  # setting diagonal to an infinite distance for
                           # pedagogical reasons (the diagonal may be left
                           # as zero)
mdm<-distancematrix(plainmatrix)
res<-nonbimatch(mdm)

nbpMatching documentation built on May 2, 2019, 5:23 p.m.