Summarize only number or integer columns in the dataframe.

0 votes
How to summarize only number or integer columns in the dataframe?
Aug 5 in Data Analytics by payal
20 views

1 answer to this question.

0 votes

Hi, Payal.

Use the below function.

data frame %>% summarise_if(is.numeric, function)

Syntax: summarize_if(.tbl, .predicate, .funs)

Here the function can be mean, length, etc. Or even a user-defined function to calculate values.

answered Aug 25 by anonymous
• 32,260 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

How can I find number of columns in a dataframe

To know the number of columns in ...READ MORE

answered Oct 11, 2018 in Data Analytics by Anmol
• 3,620 points
43 views
0 votes
2 answers
0 votes
1 answer
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
124 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
175 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
91 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
113 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
• 32,260 points
134 views
0 votes
1 answer

fetch all rows with null values in dataframe or dataset - R

Use below code -  which(is.na(air)) is.na() will return a boolean ...READ MORE

answered Jul 4 in Data Analytics by anonymous
• 32,260 points
32 views