Create Running Total Columns in a Data Frame for Multiple Variables with Dynamic Column Name Creation

I am indeed coming from Stata - trying to shed those old habits, but not succeeding. Many thanks for this! Is it possible to do a version that is lagged by one time unit?

And thanks @xiaodai - that’s super helpful to know.