I have a data.frame like
df
l a b c
1 Hi 1 2 3
2 Med 3 1 -3
3 LO 2 -1 0
And I would like to calculate its cumulative sum by row , that is, I want the result to be:
df
l a b c
1 Hi 1 3 6
2 Med 3 4 1
3 LO 2 1 1
Thanks!
I have a data.frame like
df
l a b c
1 Hi 1 2 3
2 Med 3 1 -3
3 LO 2 -1 0
And I would like to calculate its cumulative sum by row , that is, I want the result to be:
df
l a b c
1 Hi 1 3 6
2 Med 3 4 1
3 LO 2 1 1
Thanks!