View source: R/matching_join.R
| augment.matching_result | R Documentation |
S3 method for augmenting matching results following the broom package
conventions. This is a thin wrapper around join_matched() with
sensible defaults for quick exploration.
## S3 method for class 'matching_result'
augment(x, left, right, ...)
x |
A matching_result object |
left |
The original left dataset |
right |
The original right dataset |
... |
Additional arguments passed to |
This method follows the augment() convention from the broom package,
making it easy to integrate couplr into tidymodels workflows. It's
equivalent to calling join_matched() with default parameters.
If the broom package is not loaded, you can use couplr::augment()
to access this function.
A tibble with matched pairs and original data (see join_matched())
left <- data.frame(
id = 1:5,
treatment = 1,
age = c(25, 30, 35, 40, 45)
)
right <- data.frame(
id = 6:10,
treatment = 0,
age = c(24, 29, 36, 41, 44)
)
result <- match_couples(left, right, vars = "age")
couplr::augment(result, left, right)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.