Split character string multiple times every two characters
<p>I have a character column in my dataframe that looks like</p>

<pre><code>df&lt;-
  data.frame(a=c("AaBbCC","AABBCC","AAbbCC"))#df
       a
1 AaBbCC
2 AABBCC
3 AAbbCC
</code></pre>

<p>I would like to split this column every two characters. So in this case I would like to obtain three columns named <code>VA,VB,VC</code>.
I tried </p>

<pre><code>library(tidyr)
library(dplyr)
df&lt;-
  data.frame(a=c("AaBbCC","AABBCC","AAbbCC"))%&gt;%
  separate(a,c(paste("V",LETTERS[1:3],sep="")),sep=c(2,2))
 VA VB   VC
1 Aa    BbCC
2 AA    BBCC
3 AA    bbCC
</code></pre>

<p>but this is not the desired result. I like to have the result that is now in <code>VC</code> split into <code>VB</code> (all letter B) and <code>VC</code> (all letter C)How do I get R to split every two characters. The length of the string in the column is always the same for every row (6 in this example).
I will have strings that are of length >10.</p>