I have the following data frame:

```
df <- data.frame(type = c("planes", "trains", "automobiles"), t1 = c(4, 5, 6), t2 = c(20, 60, 24), t3 = c(100, 120, 72), t4 = c(800, 360, 144))

df
         type t1 t2  t3  t4
1      planes  4 20 100 800
2      trains  5 60 120 360
3 automobiles  6 24  72 144

```

I'd now like to write a function that transform columns 3:5 to be running aggregations across each row (e.g., t2 = t1+t2 and t3 = t1+t2+t3), so that my new data frame looks like this:

```
new_df
         type  t1  t2  t3  t4
1      planes   4  24  124 924
2      trains   5  65  185 545
3 automobiles   6  30  102 246

```