If you want row name based on max value in c4, use :
Or if there could be multiple max value, just use :
rownames(df)[df$c4 == max(df$c4)]
df <- structure(list(c1 = c(2L, 5L), c2 = c(3L, 8L), c3 = c(3L, 6L),
c4 = c(5L, 1L)), class = "data.frame", row.names = c("r1", "r2"))
If you are a beginner and want to know more about R then do check out the R programming course that will help you in understanding R from scratch.