I am trying to find the first/last observation by group. I tired both R and excel (because it is so slow in R so I tried excel). The excel
You can try install the Microsoft R open as your default R. In terms of math calculation, it is way faster than R base. Because it employs more cores while the R.BASE only uses one core to compute.