how to find the higher value by the previous value in a column:
df=tibble(value=c(NA,20,21,10,30,20,22))