favstats()

favstats()

The favstats() function will compute a set of common summary statistics ("favorite stats") for a given variable, including the five-number summary (minimum, Q1, median/Q2, Q3, maximum), the mean, the standard deviation, the sample size (n), and the number of missing cases.

For more information on how the favstats() function computes the five-number summary, see this article: 
​https://support.coursekata.org/portal/en/kb/articles/five-number-summary 

Idea
Example 1:

# Compute the favstats() for Thumb
favstats(~Thumb, data = Fingers)

Example output:

Output of favstats() function for Thumb

Idea
Example 2:

# Compute the favstats() for Thumb by Gender
favstats(Thumb ~ Gender, data = Fingers)

Example output:

Output of the favstats() function for Thumb by Sex