Subset Matches

Description

Remove unpaired or unnecessary matches.

Usage

1
2
subsetMatches(matches, phantom = TRUE, chameleon = TRUE, ghost = TRUE,
  infinite = TRUE, halvesOnly = TRUE)

Arguments

matches

A nonbimatch object.

phantom

A logical value. Remove elements matched to phantom elements.

chameleon

A logical value. Remove elements matched to chameleon elements.

ghost

A logical value. Remove elements matched to ghost elements.

infinite

A logical value. Remove elements matched at infinite distance. This will include elements forced to match in spite of having an infinite distance set by the prevent option in gendistance.

halvesOnly

A logical value. Use halves element instead of matches.

Details

Given a nonbimatch object, remove elements matched to phantoms, chameleons, or ghosts. Also remove pairs whose distance is infinite.

Value

a data.frame

Author(s)

Cole Beck

Examples

1
2
3
4
5
6
7
df <- data.frame(id=LETTERS[1:25], val1=rnorm(25), val2=rnorm(25))
df.dist <- gendistance(df, idcol=1, ndiscard=4)
df.mdm <- distancematrix(df.dist)
df.match <- nonbimatch(df.mdm)
subsetMatches(df.match)
subsetMatches(df.match, halvesOnly=FALSE)
subsetMatches(df.match, phantom=FALSE)