help with calculation

0 votes

I have a dataset like below.

Id  inst1  inst2 ...

1  1000  2000 ...

2  3000  1200 ...

...

I want to calculate sum like below. Can someone help.

Id  inst1  inst2   paid

1  1050  2100  3150

2  3150  2220  5370

...
Sep 3, 2019 in Data Analytics by karthick
1,210 views

1 answer to this question.

0 votes

Hi Karthik, use pmap( ) to find the sum.

use below command.

df %>% mutate(paid = pmap(df,sum))
answered Sep 4, 2019 by anonymous
• 33,050 points

Related Questions In Data Analytics

0 votes
1 answer

With the help of tidyverse: how to rename a column to a variable name

With the help of Dplyr: rename function ...READ MORE

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

edited Apr 3, 2018 by DeepCoder786 2,062 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

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

VM with network settings in Virtual box

Dear Learner, We hope you are doing well. Please ...READ MORE

answered Dec 18, 2017 in Data Analytics by