title: Iteration for columns cleaning with similar name
body: <p>I am performing a column cleaning, most of the columns have same cleaning operations and have same names with only the last character being in increasing order. I want a way to iterate them to save time.</p>
  <p>For example:</p>
  <p>i.e columns names BB1,BB2, BB3, BB4</p>
  <pre><code>US1$BB2 &lt;- ifelse(US1$BB2 == 1,1, ifelse(US1$BB2 == 2,0,NA))
  
  US1$BB3 &lt;- ifelse(US1$BB3 == 1,1, ifelse(US1$BB3 == 2,0,NA))
  </code></pre>
  <p>how would we make it more efficient?</p>