title: r - Convert multiple function arguments to string vector
body: <p>I am trying to write a function:</p>
  
  <pre><code>myfunc &lt;- function(df, out, ...) {   # ... = variables in a dataframe
  df &lt;- arrange(df, ...)               # plyr function that orders rows
  out &lt;- df[!duplicated(df[,c(...)]),] # remove duplicates
  }
  </code></pre>
  
  <p>I can't figure out how to get the <strong>third</strong> line to work. The "..." arguments just need to be converted into a string vector so that the !duplicated() function can work.</p>
  
  <p>I know <strong>deparse(substitute(x))</strong> works for 1 argument:</p>
  
  <pre><code>&gt; foo &lt;- function(x) deparse(substitute(x))
  &gt; foo(bar)
  [1] "bar"
  </code></pre>
  
  <p>But it doesn't work for multiple arguments. How can I change that so that multiple arguments will work?</p>
  
  <pre><code>&gt; foo &lt;- function(...) deparse(substitute(...))
  &gt; foo(bar,goo,poo)
  [1] "bar" "goo" "poo"
  </code></pre>
  
  <p>I would also welcome other solutions that modify the original function (myfunc) if that makes it easier. Thanks.</p>