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
31 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,610 points
292 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
994 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,750 points
137 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,290 points
78 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 Anmol
• 3,680 points
108 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
340 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
275 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
115 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
165 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
• 32,440 points
111 views