Show Menu
Cheatography

Aggregate Function in dplyr Cheat Sheet by

Aggregate Functions in Summarise

mean(x)
- Gives mean value
max(x)
- Gives maximum value
median(x)
- Gives median value
min(x)
- Gives Minimum value
sd(x)
- Gives Standard Deviation
var(x)
- Gives Variance
IQR(x)
- Inter Quartile range
diff(r­ange(x)
- Gives the range
 

Aggregate Functions in dplyr

dplyr provides several helpful aggregate functions of its own.

first(x)
- Returns First element
last(x)
- Returns Last element
nth(x,n)
- Returns nth element
n()
- Returns number of rows
n_dist­inct(x)
- Returns the count of unique values in the vector
   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          ggplot2-scatterplots Cheat Sheet
          iGraph Cheat Sheet

          More Cheat Sheets by shanly3011