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

Missing Values

You can check if a dataset has missing values per column using the apply() function.

  • The first argument of apply() is the dataframe you are inspecting, in this case, studentnetworkdata.
  • The second argument indicates whether operations should be performed row-wise (1) or column-wise (2).
  • The third argument is the function applied to each row or column. You specify it by writing function(x) ... where ... indicates the operation.
    You want to count the number of missing values in each column. Use sum(is.na(x)) to find all the missing values and count them.

How many columns in studentnetworkdata have missing values?

Bu egzersiz

Predictive Analytics using Networked Data in R

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

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat