``` r library(dplyr) x <- 1:5 typeof(lag(x, default = 0)) #> [1] "double" ``` <sup>Created on 2022-07-13 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)</sup>
Created on 2022-07-13 by the reprex package (v2.0.1)