Find Missing Values in R (Example) | How to Identify the Position of NA | is.na & which Function

Поділитися
Вставка
  • Опубліковано 4 жов 2024
  • How to find NA values in vectors and data frames in the R programming language. More details: statisticsglob...
    R code of this video:
    Example data
    expl_vec1 <- c(4, 8, 12, NA, 99, - 20, NA)
    expl_vec1
    Return logical vector indicating NAs
    is.na(expl_vec1)
    Return positions of NAs
    which(is.na(expl_vec1))

КОМЕНТАРІ • 8

  • @altareq24953
    @altareq24953 11 місяців тому +1

    does the is.na() function works as is.null() function? I am bit confused. what's difference between these 2 functions?

    • @cansustatisticsglobe
      @cansustatisticsglobe 11 місяців тому

      Hello!
      You should uıse is.na() when you want to detect NA (missing values) in your data.
      x

  • @hikikomorihachiman7491
    @hikikomorihachiman7491 2 місяці тому

    Thank you

  • @peaceok37
    @peaceok37 4 роки тому +2

    Hi ,how can we Omit NULL values from non-numerical data fields

    • @StatisticsGlobe
      @StatisticsGlobe  4 роки тому +1

      Hey Omkar, have a look at the is.null function. E.g. x

  • @asifkhaliq9086
    @asifkhaliq9086 3 роки тому +1

    How to assess the missing value from each variable?

    • @StatisticsGlobe
      @StatisticsGlobe  3 роки тому +1

      You can access only one variable using the $ operator. For example is.na(your_data$your_column) Regards, Joachim