I would like to generate a vector $\vec{u}$ of dimension $n$, so that i) it has a given correlation $r$ with a second vector $\vec{v}$ and ii) it is orthogonal to a set of $m$ vectors $A = \{\vec{w}_1, \vec{w}_2, \dots, \vec{w}_k\}$. I would like to do it in R. Any idea?
thanks a lot!
PS: Solving $A \times x = 0$ would fix ii). Also, satisfiying i) is relatively straightforward. However I have not been able to find a way to to ensure both i) and ii).