title: Finding a Pattern in R
body: <p>I am trying to clean some data. Below is an example of my data.</p>
  
  <pre><code>   test1          test2         test3    
   jsb cjn       kd N069W j        N9DSW 
  </code></pre>
  
  <p>I want to indicate what column has the pattern N0{num}{num}W in it. The {num} part can be any number between 0-9. This pattern can also appear anywhere in the string. Hence in this case my results would be as follows.</p>
  
  <pre><code>   test1          test2         test3     col
   jsb cjn       kd N069W j        N9DSW      2
  </code></pre>
  
  <p>Thanks in advance for any help.</p>