I'd like to create a dataframe that subsets the row with the the largest value in the height column for each marker by sample identification information which includes Sample_Type and Concentration. I've pasted a sample dataframe below. The final df in this example should contain rows 2-4.
structure(list(Marker = c("A", "A", "B", "B", "B", "B", "C",
"A", "A", "A"), Height = c(40L, 61L, 38L, 33L, 49L, 114L, 152L,
108L, 108L, 50L), Sample_Type = c("NTC", "NTC", "NTC", "NTC",
"NTC", "NTC", "NTC", "CEPH", "CEPH", "CEPH"), Concentration = c(100L,
100L, 100L, 100L, 100L, 100L, 100L, 100L, 50L, 50L), PCR_Protocol =
c("Current_PCR",
"Current_PCR", "Current_PCR", "Current_PCR", "Current_PCR", "Current_PCR",
"Current_PCR", "Current_PCR", "Current_PCR", "Current_PCR")), class =
"data.frame", row.names = c(NA,
-10L))
Thank you!