Get the summary of dataset in R using Dply Last Updated : 23 Aug, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will discuss how to get a summary of the dataset in the R programming language using Dplyr package. To get the summary of a dataset summarize() function of this module is used. This function basically gives the summary based on some required action for a group or ungrouped data, which in turn helps summarize the dataset. Syntax: summarize(action) The dataset in use: bestsellers3 Here, action can be any operation to be performed on grouped data, it can be frequency count, mean, average, etc. Example: Summarize the dataset using summarize() R library(dplyr) data<-read.csv("bestsellers.csv") data %>% group_by(Genre) %>% summarize(n()) Output: # A tibble: 2 x 2 Genre `n()` <fct> <int> 1 Fiction 82 2 Non Fiction 117Summarize ungrouped dataset It is also possible to summarize ungrouped data. There are three possible functions that can be used for this. summarize_all().summarize_at().summarize_if().summarize_all(): summarize_all() function summarizes all the columns based on the action to be performed. Syntax: summarize_all(action) R library(dplyr) data<-read.csv("bestsellers.csv") data %>% group_by(Genre) %>% summarize_all(mean) Output: summarize_at(): summarize_at() function is used to apply a required action to some specific columns and generate a summary based on that Syntax: summarize_at(vector_of_columns,action) R library(dplyr) data<-read.csv("bestsellers.csv") data %>% group_by(Genre) %>% summarize_at(c('User.Rating','Price'),mean) Output: summarize_if(): summarize_if() function is used to get dataset summary if a certain condition is specified. Syntax: summarize_if(condition, action) R library(dplyr) data<-read.csv("bestsellers.csv") data %>% group_by(Genre) %>% summarize_if(is.numeric, mean) Output: Comment More infoAdvertise with us Next Article How to Create Summary Tables in R? V vanshikagoyal43 Follow Improve Article Tags : R Language R Dplyr Similar Reads Summarise multiple columns using dplyr in R In this article, we will discuss how to summarise multiple columns using dplyr package in R Programming Language, Method 1: Using summarise_all() method The summarise_all method in R is used to affect every column of the data frame. The output data frame returns all the columns of the data frame whe 3 min read How to Create Summary Tables in R? In this article, we will discuss how to create summary tables in R Programming Language. The summary table contains the following information: vars: represents the column numbern: represents the number of valid casesmean: represents the mean valuemedian: represents the median valuetrimmed: represent 4 min read Apply a function to each group using Dplyr in R In this article, we are going to learn how to apply a function to each group using dplyr in the R programming language. The dplyr package in R is used for data manipulations and modifications. The package can be downloaded and installed into the working space using the following command :Â install.p 4 min read Analyzing Data in Subsets Using R In this article, we will explore various methods to analyze data in subsets using R Programming Language. How to analyze data in the subsetsAnalyzing data encompasses employing diverse methodologies to acquire insights, recognize patterns, and draw significant conclusions from datasets. This encompa 4 min read How to use Summary Function in R? The summary() function provides a quick statistical overview of a given dataset or vector. When applied to numeric data, it returns the following key summary statistics:Min: The minimum value in the data1st Qu: The first quartile (25th percentile)Median: The middle value (50th percentile)3rd Qu: The 2 min read Group by function in R using Dplyr Group_by() function belongs to the dplyr package in the R programming language, which groups the data frames. Group_by() function alone will not give any output. It should be followed by summarise() function with an appropriate action to perform. It works similar to GROUP BY in SQL and pivot table i 2 min read Like