title: dplyr mutate in R - add column as concat of columns
body: <p>I have a problem with using <code>mutate{dplyr}</code> function with the aim of adding a new column to data frame. I want a new column to be of character type and to consist of "concat" of sorted words from other columns (which are of character type, too). For example, for the following data frame:</p>
  
  <pre><code>&gt; library(datasets)
  &gt; states.df &lt;- data.frame(name = as.character(state.name),
  +                         region = as.character(state.region),
  +                         division = as.character(state.division))
  &gt; 
  &gt; head(states.df, 3)
       name region           division
  1 Alabama  South East South Central
  2  Alaska   West            Pacific
  3 Arizona   West           Mountain 
  </code></pre>
  
  <p>I would like to get a new column with the following first element:</p>
  
  <pre><code>"Alamaba_East South Central_South" 
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>mutate(states.df,
     concated_column = paste0(sort(name, region, division), collapse="_"))
  </code></pre>
  
  <p>But I received an error: </p>
  
  <pre><code>Error in sort(1:50, c(2L, 4L, 4L, 2L, 4L, 4L, 1L, 2L, 2L, 2L, 4L, 4L,  : 
    'decreasing' must be a length-1 logical vector.
  Did you intend to set 'partial'?
  </code></pre>
  
  <p>Thank you for any help in advance!</p>