mergeKeywords: Merge DE and ID Fields into a Unified Keywords Column

View source: R/zzz.R

mergeKeywordsR Documentation

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)

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.

Value

A dataframe with an added (or updated) 'KW_Merged' column containing deduplicated and cleaned keyword strings.

Examples

## Not run: 
data(management, package = "bibliometrix")
M <- mergeKeywords(management)
head(M$KW_Merged)

## End(Not run)


massimoaria/bibliometrix documentation built on June 15, 2025, 2:06 a.m.