← Back to R Course | Chapter 9: Statistics | Lesson 3 of 7

summary()

In this page:

  1. summary()

summary()

summary() produces a quick statistical overview of a numeric vector or data frame -- minimum, 1st quartile, median, mean, 3rd quartile, and maximum. Applied to a whole data frame, it summarizes every column at once. It's usually the very first function run after loading a new dataset to get a quick sense of its shape.

Note: summary(df) run on a whole data frame gives you a quick per-column overview in one call.

Example: summary()

markup
values <- c(23, 5, 67, 12, 45, 30, 8)

print(summary(values))
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.