My question is very similar to this one but I can\'t manage exactly how to apply that answer to my problem.
I am looping through a vector with a variable k
k
Another alternative without setdiff() is
setdiff
vector(1:end ~= k)