Change column names in DT package right before output to Shiny app
<p>I would like to change the column names of a datable at the very last step before I output it in a Shiny app.  The display names are quite long, and I do not want to change them while I'm manipulating the datatable.  There are a lot more formatting changes to the datatable than below in my actual dataset.  </p>

<p>Here is a dummy dataset:</p>

<pre><code>library(DT)
test.df &lt;- data.frame(a = runif(10), b = 21:20, c = 31:30, d = 31:40)
test.dt &lt;- datatable(test.df) %&gt;% formatPercentage('a', 0) %&gt;% formatCurrency('c', '$')
</code></pre>

<p>Now, how would I change the column names to c('Col1', 'Col2', 'Col3', 'Col4')?  Again, I would like this to be the last step before I output the datatable with a <code>renderDataTable</code> function.  </p>

<p>If there's a way to create column aliases as opposed to changing the actual column names, that would work as well.  </p>