I have the following example dataframe in R: MyData I would like to do the following: For each SampleID, if an Analyte has a