To make a column of simplified group names for each sample, ‘Stringr’ is helpful. Two new columns are created, named “group” and “serum”. The function ‘str_detect’ is to detect the presence of the words, and then fill the row accordingly. It totally depends on your dataset to...