Summarize only number or integer columns in the dataframe.

0 votes
How to summarize only number or integer columns in the dataframe?
Aug 5, 2019 in Data Analytics by payal
38 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, 2019 by anonymous
• 32,460 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 Abhi
• 3,680 points
51 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
504 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
312 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
131 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
200 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, 2019 in Data Analytics by anonymous
• 32,460 points
226 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, 2019 in Data Analytics by anonymous
• 32,460 points
525 views