You can check the code for a function like so:
> row_number
function (x)
rank(x, ties.method = "first", na.last = "keep")
<environment: namespace:dplyr>
So yes it's a dplyr function, but it's simply a wrapper around the base function rank() and if you check the arguments, you can see, that e.g. row_number() == 1L will let you manipulate based on ranks, e.g.:
mtcars %>% group_by(cyl) %>% filter(row_number(hp) == 1)
Which is equivalent to, but more robust than:
mtcars %>% group_by(cyl) %>% arrange(hp) %>% slice(1)
If you look at the help, you can see that the row_number functions 'are provided mainly as a convenience when converting between R and SQL'
Hope it helps,
Bw. Leon