I have a data frame on R. I would like to get the unique rows based on the first three columns and also append the min value of the 4th column in each unique row.
dat <- tibble(
x = c("a", "a", "k", "k"),
y = c("a", "a", "l", "l"),
z = c("e", "e", "m" ,"m"),
t = c("4", "3", "8" ,"9"))
What I would like to see is below.
| x | y | z | t |
|---|---|---|---|
| a | a | e | 3 |
| k | l | m | 8 |
I believe there is a very easy way to do that but I can not see it at that moment.