View source: R/mergeAndFillCols.R
mergeAndFillCols | R Documentation |
Takes >= 2 columns with overlapping, incomplete data and merges them into 1 column.
mergeAndFillCols(
data_dt,
toMerge_v,
outName_v = "merged",
search_lsv = NULL,
replace_lsv = NULL,
check_v = T
)
data_dt |
data.table with values |
toMerge_v |
vector of column names that should be merged |
outName_v |
name of the resulting merged column. Default is 'merged'. |
search_lsv |
list of values to search for within the columns. This is done before merge. One example is the 'age' columns that have KJ in them. Can search for those and replace with NA to take the value in the other column. |
replace_lsv |
list of values to replace. Each element must match with search_lsv |
check_v |
logical. TRUE (default) check new column accuracy by searching for '_'; FALSE - don't check |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.