Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed icon indicating copy to clipboard operation
Statistical_Rethinking_with_brms_ggplot2_and_the_tidyverse_2_ed copied to clipboard

dplyr::lag()

Open ASKurz opened this issue 1 year ago • 0 comments

In Section 2.2.2, make sure you use the n argument within lag(). The current code uses k, as if you were using the lag() function from the stats package. You, however, are using dplyr::lag(), which uses n, instead.

Credit @JFern83, who alerted me in a Twitter DM, for the catch

ASKurz avatar Dec 12 '23 20:12 ASKurz