How to combine text in multiple rows into a single line of text.

Suppose you have "category" and "product" columns in a data frame like the following.

Now, you want to have one row for each category and combine product names into a single line of text separated by comma like the following.

Here is how.

From the column header menu of the "category" column, select "Summarize (Aggregate)".

In the Summarize dialog, choose "(Custom)" at the "Value".

Type in the following expression in the Expression editor and click OK.

str_c(product, collapse=",")

Now you have product names separated by comma for each category. Click "Run" to finalize it.