BaşlayınÜcretsiz Başlayın

Comparing population and life expectancy

In this exercise, you'll use ggplot2 to create a scatter plot from scratch, to compare each country's population with its life expectancy in the year 1952.

Bu egzersiz

Introduction to the Tidyverse

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a scatter plot of gapminder_1952 with population (pop) is on the x-axis and life expectancy (lifeExp) on the y-axis.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

library(gapminder)
library(dplyr)
library(ggplot2)

gapminder_1952 <- gapminder %>%
  filter(year == 1952)

# Create a scatter plot with pop on the x-axis and lifeExp on the y-axis
Kodu Düzenle ve Çalıştır