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 in Data Analytics by karthick
15 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 3 by anonymous
• 25,840 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,700 points

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

Big Data transformations with R

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

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
47 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 Sudhir
• 1,610 points
82 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,700 points
95 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,700 points
112 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,700 points
76 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,700 points
68 views
0 votes
2 answers

How to count the number of elements with the values in a vector?

Use dplyr function group_by(). > n = as.data.frame(num) > ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 25,840 points
95 views
0 votes
2 answers

How to remove rows with missing values (NAs) in a data frame?

Hi, The below code returns rows without ...READ MORE

answered Aug 20 in Data Analytics by anonymous
• 25,840 points
4,484 views