Description Usage Arguments Details Value Note Author(s)
Merge a list of datasets
1 | iterative_merge(dfs_list, key, unify_id = FALSE, keep = NULL, ...)
|
dfs_list |
list of datasets |
key |
join IDs |
unify_id |
argument that indicates if the same ID has a different name in each table |
keep |
argument that indicates if you want to get .x variables or .y variables |
... |
additional parameters of merge |
This function allows you to make any type of merge of different datasets withing a list unifying the ID variable and cleaning duplicated variables.
"This function returns a merged dataset of all datasets from dfs_list
with different results based on keep
argument:"
If keep is NULL
return the merged dataset without cleaning the duplicated variables after merging.
If keep = "x"
return the dataset with the no duplicated variables and the duplicated old variables without the extension .x
If keep = "y"
return the dataset with the no duplicated variables and the duplicated new variables without the extension .y
If unify_id = TRUE
, the keys argument ids of each dataset is going to be renamed as ID, with the intention that the merge works with the variables with name ID (only if is the same ID with different name in each)
If you select the keep
argument and there is no duplicated variables, then it will ignore that argument.
Eduardo Trujillo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.