Currently the way to enter parameters for matching data is quite awkward as it a list of lists:
funlist <- list(
list(d1vars = "ID",
d2vars = "ID",
fun = "nameDists",
extraparams = NULL,
weight = 1),
list(d1vars = c("Surname", "OtherNames"),
d2vars = c("SurnameLab", "OtherNameLab"),
fun = "nameDists",
extraparams = NULL,
weight = 0.5)
)
Instead of this monstrosity, it could be converted into a couple of S4 class objects and given accessors (and subsetters like "[["). This way the process could be something like:
IDparam <- new("paramclass", fun = "nameDists")
NAMEparam <- new("paramclass", fun = "nameDists")
vars(IDparam) <- list("ID", "ID")
vars(NAMEparam) <- list(c("Surname", "OtherNames"), c("SurnameLab", "OtherNameLab"))
weight(IDparam) <- 1
weight(NAMEparam) <- 0.5
funlist <- new("epiclass", IDparam, NAMEparam)
Currently the way to enter parameters for matching data is quite awkward as it a list of lists:
Instead of this monstrosity, it could be converted into a couple of S4 class objects and given accessors (and subsetters like "[["). This way the process could be something like: