Calculate running total

0 votes
How to calculate running total of a afiedl in R? I have loan details, i want to check the amount paid, till date.
Aug 2, 2019 in Data Analytics by rubini
608 views

1 answer to this question.

0 votes

Hi rubini,

Use accumulate or reduce function to find the running total.

Accumulate will show step by step running total whereas reduce shows final su value and no intermediate values.

For calculating running total, try as below.

library(purrr)
dataframe$col >%> accumulate(`+`)

dataframe$col %>% reduce(`+`)
answered Aug 30, 2019 by anonymous

Related Questions In Data Analytics

0 votes
1 answer

Issue while running Oozie job

Dear Learner, Hope you are doing well. To overcome ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,421 views
0 votes
1 answer

How can I measuring running time of R Code ?

5 ways to measure running time of ...READ MORE

answered Apr 17, 2018 in Data Analytics by anonymous
12,784 views
0 votes
1 answer

How can I calculate mean per group in a data.frame?

You can use aggregate function for calculating ...READ MORE

answered May 24, 2018 in Data Analytics by zombie
• 3,790 points
3,971 views
0 votes
1 answer

How to calculate group mean and assign it to new data in R

You can use something like this: df$grp.mean.values <- ...READ MORE

answered Jun 27, 2018 in Data Analytics by Sahiti
• 6,370 points
1,905 views
0 votes
1 answer

What do you understand by statistical power of sensitivity and how do you calculate it?

Sensitivity is commonly used to validate the ...READ MORE

answered Aug 20, 2018 in Data Analytics by Abhi
• 3,720 points
1,145 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
2,264 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,961 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by Gitika 1,200 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,393 views
0 votes
1 answer

Error with running SQL Query:

Use below code. ofc <- dbGetQuery(db,'select * from ...READ MORE

answered Oct 1, 2019 in Data Analytics by anonymous
• 33,030 points
1,095 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP