Learn R Programming

bibliometrix (version 5.0.1)

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.

Examples

Run this code
if (FALSE) {
data(management, package = "bibliometrix")
M <- mergeKeywords(management)
head(M$KW_Merged)
}

Run the code above in your browser using DataLab