In R, I have an element x and a vector v. I want to find the first index of an element in v that is equal to x
Is there a way to extend a vector by making it repeat itself? >v = [1 2]; >v10 = v x 5; %x represents s
You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function