title: r: Error: Must extract column with a single valid subscript
body: <p>I have a column in the dataframe with the values: &quot;Q1&quot;, Q2&quot;, &quot;Q3&quot;, etc. I'm trying to separate the letter &quot;Q&quot; from the numeric values using:</p>
  <pre><code>DF %&gt;% separate(DF$tmp, c(NA, &quot;Number&quot;), &quot;(?&lt;=[A-Z])(?=[0-9])&quot; ). 
  </code></pre>
  <p>I get the following error:</p>
  <blockquote>
  <p>&quot;Error: Must extract column with a single valid subscript. x Subscript
  var has size 452 but must be size 1. &quot;</p>
  </blockquote>
  <p>I don't get this error if I create the dataframe manually using:</p>
  <pre><code>df &lt;- data.frame(x = c(NA, &quot;Q1&quot;, &quot;Q2&quot;, &quot;Q10&quot;))
  
  df %&gt;% separate(x, c(NA, &quot;B&quot;), &quot;(?&lt;=[A-Z])(?=[0-9])&quot; )
  </code></pre>
  <p>But I do get the error when working with the existing dataframe (I checked, and <code>is.dataframe</code> returns <code>TRUE</code>)</p>