0

I am trying to extract the position indices of missing values of a vector.

I have a vector which is length 46, but I know it should have 72 values. The other values are implicitly missing. For example, j is the vector of the valid indices and i is the vector of all 1-72 indices:

> j [1] 1 2 3 4 5 6 8 9 11 13 15 16 17 20 21 22 23 25 27 31 32 33 35 38 39 40 41 45 46 47 48 50 52 53 57 59 61 62 63 64 65 67 68 69 70 71

    i <- 1:72

I have tried i[!=j], but this produces an error - Error: unexpected '!=' in "i[!=" but i[j] gives the correct 46 indices.

Please can somebody advise.

Thanks, Mark

Mark
  • 37
  • 1
  • 8

0 Answers0