Description Usage Format Examples
Keep track on natural keys and generate surrogate keys. It is not part of Anchor Model but complementary identities provider.
1 |
An R6 class object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # new IM instance
im <- IM$new()
# define mnemonics and natural keys
im$create(mne = "GEN", nk = "gender")
im$create(mne = "UL", nk = "user_login")
# populate data
data <- data.table(user_login = c("asd","qwe","zxc","asd","zxc","asd"),
gender = c("F","M","M","F","M","F"),
balance = rnorm(6,10))
data
# update and lookup identities from IM
data.sk <- im$use(data, mne = c("UL","GEN"))
data.sk
# incremental load
data <- data.table(user_login = c("zxc","qaz","qaz","zaq"),
gender = c("M","F","F","M"),
balance = rnorm(4,10))
data.sk <- im$use(data, mne = c("UL","GEN"))
data.sk
# preview identities
im$ID
# get IM size
print(im)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.