title: R: dplyr - Change factor "SI" for column name with "mutate"
body: <p>I've this data.frame. And i need to loop through every column and search for "SI", then change it for the columns name.</p>
  
  <p>I have this:</p>
  
  <pre><code>SKU             Tv.y.Video  Cómputo     Tecnología
  2003091090002P     NO          NO           NO
  2003091090002      NO          NO           NO
  2003120060006P     NO          NO           NO
  2003120060006P     NO          NO           NO
  2003120060006      NO          NO           NO
  2004121460000P     NO          SI           NO
  2004121460000      NO          SI           NO
  2004121440002P     NO          SI           NO
  2004121440002      NO          SI           NO
  2004123030003P     NO          SI           NO
  </code></pre>
  
  <p>Need to get this:</p>
  
  <pre><code>         SKU         Tv.y.Video   Cómputo       Tecnología
     2003091090002P      NO          NO           NO
     2003091090002       NO          NO           NO
     2003120060006P      NO          NO           NO
     2003120060006P      NO          NO           NO
     2003120060006       NO          NO           NO
     2004121460000P      NO          Cómputo      NO
     2004121460000       NO          Cómputo      NO
     2004121440002P      NO          Cómputo      NO
     2004121440002       NO          Cómputo      NO
     2004123030003P      NO          Cómputo      NO
  </code></pre>
  
  <p>My code:</p>
  
  <p>I've tried this with this code:</p>
  
  <pre><code>df$Tv.y.Video &lt;- mutate(df$Tv.y.Video,
                  Tv.y.Video = ifelse(sub("SI", Tv.y.Video), "Tv.y.Video", Tv.y.Video))
  </code></pre>
  
  <p>But got this message:</p>
  
  <pre><code>Error in UseMethod("mutate_") : 
    no applicable method for 'mutate_' applied to an object of class "factor"
  </code></pre>
  
  <p>So i've change the class of that column to character with this:</p>
  
  <pre><code>df$Tv.y.Video &lt;- as.character(df$Tv.y.Video)
  </code></pre>
  
  <p>And got this message:</p>
  
  <pre><code>Error in UseMethod("mutate_") : 
    no applicable method for 'mutate_' applied to an object of class "character"
  </code></pre>
  
  <p>This is the result from str(df):</p>
  
  <pre><code>    'data.frame':   10 obs. of  4 variables:
   $ SKU       : Factor w/ 9028 levels "2003014460004",..: 9 8 16 16 15 842 841 840 839 846
   $ Tv.y.Video: chr  "NO" "NO" "NO" "NO" ...
   $ Cómputo   : Factor w/ 2 levels "NO","SI": 1 1 1 1 1 2 2 2 2 2
   $ Tecnología: Factor w/ 2 levels "NO","SI": 1 1 1 1 1 1 1 1 1 1
  </code></pre>