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

Fix explicit missings using fill()

One type of missing value that can be obvious to deal with is where the first entry of a group is given, but subsequent entries are marked NA.

These missing values often result from empty values in spreadsheets to avoid entering multiple names multiple times; as well as for "human readability".

This type of problem can be solved by using the fill() function from the tidyr package.

Bu egzersiz, kursun bir parçasıdır

Dealing With Missing Data in R

Kursa Göz Atın

Egzersiz talimatları

  • Use fill() to fill down the "name" observations in the frogger dataset.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Print the frogger data to have a look at it
___

# Use `fill()` to fill down the name variable in the frogger dataset
___ %>% fill(___)
Kodu Düzenle ve Çalıştır