View source: R/R12-SWA_linking_code.R
camr_SWA_linking_code | R Documentation |
Function to link records (e.g., across different time points) using a set of linking items.
camr_SWA_linking_code(
dtf_long,
lst_link_across = NULL,
obj_link_using = NULL,
lst_link_combo = NULL,
lst_link_threshold = NULL,
lgc_progress = TRUE
)
dtf_long |
A data frame, must have a column with
integer values for time points ( |
lst_link_across |
A list of lists, with each sublist specifying
|
obj_link_using |
Either a character vector with the column
names for the linking items, or a list of character vectors,
one vector for each set defined in |
lst_link_combo |
A list of lists, where each sublist consists of
an integer vector indexing the combination of linking items to
consider in order of priority. One sublist of integer vectors must
be defined for each set defined by |
lst_link_threshold |
A list of lists, where each sublist consists
of integer vectors for each combination of linking items defined in
|
lgc_progress |
A logical value; if |
A data frame.
Michael Pascale and Kevin Potter
# Linking across time points
dtf_demo <- camr_SWA_linking_code_simulate('demo')
dtf_demo_linked <- camr_SWA_linking_code(dtf_demo)
# Identifying duplicate records
dtf_dup <- camr_SWA_linking_code_simulate( 'duplicate' )
dtf_dup_linked <- camr_SWA_linking_code(
dtf_dup,
lst_link_across = list(
DR2023F = list(
Base = rep( TRUE, nrow(dtf_dup) ),
Add = rep( TRUE, nrow(dtf_dup) )
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.