mergeKeywords: Merge DE and ID Fields into a Unified Keywords Column
Description
This function creates a new column `KW_Merged` by combining the contents of the `DE` (author keywords) and `ID` (keywords plus) fields
in a bibliographic dataframe. Duplicate keywords within each record are removed, and leading/trailing spaces are trimmed.
The merged keywords are separated by a semicolon (`;`).
Usage
mergeKeywords(M, force = FALSE)
Value
A dataframe with an added (or updated) `KW_Merged` column containing deduplicated and cleaned keyword strings.
Arguments
M
A dataframe containing at least the `DE` and/or `ID` columns, typically generated by `convert2df()` from the `bibliometrix` package.
force
Logical. If `TRUE`, an existing `KW_Merged` column will be overwritten. Default is `FALSE`.
Details
If the `KW_Merged` column already exists, it will not be overwritten unless `force = TRUE` is specified.