Description Usage Arguments Value Examples
Checks for two possible matches the intervals $\[t_i,j-max_j, t_i,j-min_j\]$ intersect. If the condition fails than each Levenshtein distance will be increased by one.
1 2 |
match |
match structure |
data |
list of data frames |
min |
minimal in/decrease, defaults to |
max |
maximal in/decrease, defaults to |
... |
named list of variables (one for each data frame) |
updated match structure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | set.seed(0)
# create two data sets where the second consists of
# 200 obs. only in t1, 200 obs. in t1 and t2 and
# 100 obs. only in t2
n <- list(c(200, 1), c(200, 1, 2), c(100, 2))
x <- generateTestData(n)
# create ages in years from birthdays
today <- as.Date(Sys.time())
x[[1]]$age <- as.numeric(trunc(difftime(today, x[[1]]$birthday, unit="days")/365))
x[[2]]$age <- as.numeric(trunc(difftime(today+365, x[[2]]$birthday, unit="days")/365))
#
match <- findMatch(x, c('code', 'code'))
summary(match)
match <- numIncrease(match, x, age=c('age', 'age'))
summary(match)
head(match)
## Not run:
# with %>% operator
library('magrittr')
match <- findMatch(x, c('code', 'code')) %>%
numIncrease(x, age=c('age', 'age'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.