0

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?

xiaodai
  • 14,889
  • 18
  • 76
  • 140

0 Answers0