Description Usage Arguments Value Examples
View source: R/check-ids-match.R
Compare IDs (such as individual IDs or specimen IDs) between two data frames.
Ensure that all individual IDs in two data frames match.
Ensure that all specimen IDS in two data frames match
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | check_ids_match(
x,
y,
idcol = c("individualID", "specimenID"),
xname = NULL,
yname = NULL,
bidirectional = TRUE
)
check_indiv_ids_match(x, y, xname = NULL, yname = NULL, bidirectional = TRUE)
check_specimen_ids_match(
x,
y,
xname = NULL,
yname = NULL,
bidirectional = TRUE
)
|
x, y |
Data frames to compare |
idcol |
Name of column containing ids to compare |
xname, yname |
Names of x and y (to be used in resulting messages) |
bidirectional |
Should mismatches from both x and y be reported?
Defaults to |
A condition object indicating whether IDs match ("check_pass"
) or
not ("check_fail"
). Mismatched IDs are included as data within the
object.
1 2 3 4 5 6 7 8 9 | a <- data.frame(individualID = LETTERS[1:3])
b <- data.frame(individualID = LETTERS[1:4])
check_ids_match(a, b, idcol = "individualID", xname = "a", yname = "b")
a <- data.frame(individualID = LETTERS[1:3])
b <- data.frame(individualID = LETTERS[1:4])
check_specimen_ids_match(a, b, "individual", "biospecimen")
a <- data.frame(specimenID = LETTERS[1:3])
b <- data.frame(specimenID = LETTERS[1:4])
check_specimen_ids_match(a, b, "biospecimen", "assay")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.