report_diff | R Documentation |
Compares each element of two vectors to each other and reports the number of total matches and mismatches, as well as a count for each unique mismatch.
report_diff(l, r, full = TRUE)
l |
(Vector) Any vector. |
r |
(Vector) Any vector. |
full |
(Logical) If |
A dataframe.
Desi Quintans (http://www.desiquintans.com)
v1 <- c(1, 2, 3, 4, 5, NA, NA)
v2 <- c(1, 2, 5, 4, 3, NA, 7)
report_diff(v1, v2)
#> pairs count
#> 1 l == r 4
#> 2 l != r 3
#> 3 `3` != `5` 1
#> 4 `5` != `3` 1
#> 5 `NA` != `7` 1
report_diff(v1, v2, full = FALSE)
#> pairs count
#> 1 l == r 4
#> 2 l != r 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.