Sampling a vector by equal split
<p>If I have a vector of strings of any length say;</p>

<pre><code>vec &lt;- c("a","b","c","d","e","f","g","h","i")
</code></pre>

<p>I am looking for a function to sample n number of values from this vector using a strategy shown below. Showing figures since it's hard to explain.</p>

<pre><code>function call: 
result:
schematic diagram:

fn(vector=vec,n=1)
"a"

|
a b c d e f g h i


fn(vector=vec,n=2)
"a" "i"
 _______________
|               |
a b c d e f g h i


fn(vector=vec,n=3)
"a" "e" "i"
 _______________
|       |       |
a b c d e f g h i


fn(vector=vec,n=4)
"a" "c" "g" "i"
 _______________
|   |     |     |
a b c d e f g h i


fn(vector=vec,n=5)
"a" "c" "e" "g" "i"
 _______________
|   |   |   |   |
a b c d e f g h i
</code></pre>

<p>The sampling does not have to be accurate. The values can be from roughly the correct region but must be consistent. The string vector can be even or odd.</p>