title: Numbers to month names in spanish
body: <p>I´m trying to translate a column on a dataframe that has month numbers (1 for January, 2 for February and so on), so I want to translate those numbers to spanish month names.
  First I tried:</p>
  
  <pre><code>df$month &lt;- month.name[df$month]
  </code></pre>
  
  <p>That works fine, but the outputs shows english names.</p>
  
  <p>Then I tried using gsub:</p>
  
  <pre><code>num &lt;- c(1,2,3,4,5,6,7,8,9,10,11,12)
  meses &lt;- c("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio",
          "Agosto","Septiembre","Octubre","Noviembre","Diciembre")
  gsub2 &lt;- function(pattern, replacement, x, ...) {
    for(i in 1:length(pattern))
      x &lt;- gsub(pattern[i], replacement[i], x, ...)
    x
  }
  df$month &lt;- gsub2(num, meses,df$month)
  </code></pre>
  
  <p>But with this code, my output is as follows:</p>
  
  <pre><code>"Enero"        "Febrero"      "Marzo"     "Abril"        "Mayo"        
   "Junio"        "Julio"        "Agosto"    "Septiembre"  "Enero0"           "EneroEnero"   "EneroFebrero"
  </code></pre>
  
  <p>I know what is happening, but I don't know how to fix it. Thanks in advance.</p>
  
  <p>Edit:</p>
  
  <pre><code>df$month &lt;- c(1, 2, 3, 4, 5, 6 ,7, 8, 9, 10, 11, 12)
  </code></pre>