library(dplyr)
A <- data.frame(name = c('A', 'A', 'B', 'C', 'C', 'A', 'C', 'B', 'A'),
number = c(1:9))
> A
name number
1 A 1
2 A 2
3 B 3
4 C 4
5 C 5
6 A 6
7 C 7
8 B 8
9 A 9
B <- A %>%
group_by(name) %>%
summarise(number = min(number))
> B
Source: local data frame [3 x 2]
name number
(fctr) (int)
1 A 1
2 B 3
3 C 4