I have a data.frame
df = data.frame(
a = sample(letters, 100, replace=T),
b = runif(100),
d = runif(100)
)
And I want to find the first element of each row grouped by a and ordered by b. How do I achieve that?
I have a data.frame
df = data.frame(
a = sample(letters, 100, replace=T),
b = runif(100),
d = runif(100)
)
And I want to find the first element of each row grouped by a and ordered by b. How do I achieve that?