Filtering for one year
The filter verb extracts particular observations based on a condition. In this exercise you'll filter for observations from a particular year.
Bu egzersiz
Introduction to the Tidyverse
kursunun bir parçasıdırEgzersiz talimatları
- Add a
filter()line after the pipe (%>%) to extract only the observations from the year 1957. Remember that you use==to compare two values.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
library(gapminder)
library(dplyr)
# Filter the gapminder dataset for the year 1957
gapminder %>%