get.sets | R Documentation |
Create a factor variable using the names from a matched data set.
get.sets(matches, remove.unpaired = TRUE, ...)
matches |
A data.frame or nonbimatch object. Contains information on how to match the covariate data set. |
remove.unpaired |
A boolean value. The default is to remove elements matched to phantom elements. |
... |
Additional arguments, not used at this time. |
Calculate a name for each pair by using the ID columns from the matched data set. Return a factor of these named pairs.
a factor vector
Jake Bowers, http://www.jakebowers.org/, Cole Beck
df <- data.frame(id=LETTERS[1:25], val1=rnorm(25), val2=rnorm(25))
df.dist <- gendistance(df, idcol=1)
df.mdm <- distancematrix(df.dist)
df.match <- nonbimatch(df.mdm)
get.sets(df.match)
get.sets(df.match$matches)
# include the phantom match
get.sets(df.match$matches, FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.