Concatenate text by a common key
gather_df_lines.Rd
This function concatenates text spread across multiple rows based on a common key, using only base R functions.
Arguments
- df
A data.frame containing the data
- key_colname
character
The column used as the grouping key (character string)- text
character
The column containing the text to be concatenated (character string)- sep
character
The separator used to concatenate the text (default is " ")- trimws
logical
, default =TRUE
IfTRUE
, suppress leading, tail and double white spaces- text_colname
character
The colname for the concatened text column (default is "content")