I have the dataframe DATA1 as shown for a few rows:
structure(list(S = c(12, 12, 15, 15, 15, 9, 9), UG = c(84, 84, 84, 84, 84, 84, 84), CSi = c(0.48718144148