เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Numerical summaries of age

Let's continue our exploratory data analysis of the numerical explanatory variable age by computing summary statistics. Summary statistics take many values and summarize them with a single value. Let's compute three such values using dplyr data wrangling: mean (AKA the average), the median (the middle value), and the standard deviation (a measure of spread/variation).

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Modeling with Data in the Tidyverse

ดูคอร์ส

คำแนะนำการฝึกหัด

Calculate the mean, median, and standard deviation of age.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Load packages
library(moderndive)
library(dplyr)

# Compute summary stats
evals %>%
  ___(mean_age = ___(age),
            median_age = ___(age),
            sd_age = ___(age))
แก้ไขและรันโค้ด