Relative Content

Tag Archive for rdplyrtidyverselag

lag function in R does not work as expected

I have a panel dateset on the distict level from Germany with three different years (2013, 2017, 2021). I want to lag one of my variables but the lag function form R only provides the same variable again from the same period which is not lagged.

lag function in R does not work as expected

I have a panel dateset on the distict level from Germany with three different years (2013, 2017, 2021). I want to lag one of my variables but the lag function form R only provides the same variable again from the same period which is not lagged.

lag function in R does not work as expected

I have a panel dateset on the distict level from Germany with three different years (2013, 2017, 2021). I want to lag one of my variables but the lag function form R only provides the same variable again from the same period which is not lagged.