let say vector x = c(33, 22, 45)
In the reference code the function body says, take index of x and inside the index don't keep the value matched with x. If say the value is 45 and it removed from x inside the indexing then in outer of indexing i.e. x [ ] how it restoring the 33 and 22. I'm little bit confused with this function, how actually it keeping the index 1 and 2 as 33 and 22.
why not it returning x[33,22] which provides NA values but actually it taking the values like x[1,2] excluding the 33 at 3rd index position.
May be I'm not getting it properly. Can anyone please elaborate how the code is producing 33 and 22 as output?
A code example is attached in .JPG format
***** This code is for R programming language.