Can someone school me on the best way to add arrows to ggplot? I have a little reprex below in which I draw an arrow. The first method is copied from Statology. The second method is from the *R Graphics Cookbook*. The former seems a little easier. The latter, well, the *R Graphics Cookbook* is the bible as far as I'm concerned.

Can anyone tell me the difference in the two approaches? Any pros and cons?

```
library(tidyverse)
t <- tibble(x = c(1,2,3),y=c(3,2,2))
# https://www.statology.org/ggplot-arrows/
t |> ggplot(aes(x=x,y=y)) + geom_point() +
geom_segment(aes(x=1, y=2, xend=2, yend=2),
arrow = arrow(length=unit(.5, 'cm')))
```

```
# https://r-graphics.org/recipe-annotate-segment
t |> ggplot(aes(x=x,y=y)) + geom_point() +
annotate("segment", x=1, y=2, xend=2, yend=2,
arrow = arrow())
```

^{Created on 2023-12-07 with reprex v2.0.2}