Internal function that is short for which(is.na(x), arr.ind = TRUE)
.
Creates array index locations of missing values in a dataframe.
Value
a matrix with columns "row" and "col", which refer to the row and column that identify the position of a missing value in a dataframe
Examples
where_na(airquality)
#> row col
#> [1,] 5 1
#> [2,] 10 1
#> [3,] 25 1
#> [4,] 26 1
#> [5,] 27 1
#> [6,] 32 1
#> [7,] 33 1
#> [8,] 34 1
#> [9,] 35 1
#> [10,] 36 1
#> [11,] 37 1
#> [12,] 39 1
#> [13,] 42 1
#> [14,] 43 1
#> [15,] 45 1
#> [16,] 46 1
#> [17,] 52 1
#> [18,] 53 1
#> [19,] 54 1
#> [20,] 55 1
#> [21,] 56 1
#> [22,] 57 1
#> [23,] 58 1
#> [24,] 59 1
#> [25,] 60 1
#> [26,] 61 1
#> [27,] 65 1
#> [28,] 72 1
#> [29,] 75 1
#> [30,] 83 1
#> [31,] 84 1
#> [32,] 102 1
#> [33,] 103 1
#> [34,] 107 1
#> [35,] 115 1
#> [36,] 119 1
#> [37,] 150 1
#> [38,] 5 2
#> [39,] 6 2
#> [40,] 11 2
#> [41,] 27 2
#> [42,] 96 2
#> [43,] 97 2
#> [44,] 98 2
where_na(oceanbuoys$sea_temp_c)
#> [1] 463 481 637