Extracting entry positions in R : <p>I have a vector, A, with lots of entries, for example</p>

<pre><code>1 4 2 5 6 7 8 3 5
</code></pre>

<p>I want to get a list of all the positions of entries in that vector that are in [2,6], so id like the output to be </p>

<pre><code>2 3 4 5 8 9
</code></pre>

<p>please help</p>
