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

Adding a year column

The next step of data cleaning is manipulating your variables (columns) to make them more informative.

In this case, you have a session column that is hard to interpret intuitively. But since the UN started voting in 1946, and holds one session per year, you can get the year of a UN resolution by adding 1945 to the session number.

Bu egzersiz

Case Study: Exploratory Data Analysis in R

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

Egzersiz talimatları

Use mutate() to add a year column by adding 1945 to the session column.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Add another %>% step to add a year column
votes %>%
  filter(vote <= 3)
Kodu Düzenle ve Çalıştır