I have a data frame like this:
df <- structure(list(groups= c("group1", "group2", "group3", "group4"),