How to have R formattable rendered to pdf output and how to have percents in the table
<p>I´m starting using <code>R</code> <code>formattable</code>package and still facing some problems to have  chunks with <code>formattable()</code> outputting pdf document properly. </p>

<p>First problem: how to have numbers in percent format after applying any of the <code>color_*</code> functions available for numeric class only? </p>

<p>See the table below from the code presented executed/ran in <code>R</code>enviroment.  </p>

<pre><code>a&lt;-formattable(x=a,list(A=color_bar("orange", 0.2),B=color_bar("orange", 0.2),C=color_bar("orange", 0.2),D=color_bar("orange", 0.2),E=color_bar("orange", 0.2)))
</code></pre>

<p>Assume <code>a</code> as a <code>csv</code>file I had input by <code>read.csv()</code>. </p>

<p><a href="https://i.stack.imgur.com/xk8kA.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/xk8kA.jpg" alt="enter image description here"></a></p>

<p>I want to have the "%" pasted together the numbers and, at same time, the orange bars from <code>formattable</code>, but if I convert the <code>numeric</code> to <code>percent</code> either by <code>percent()</code> from <code>scale</code> or by <code>paste(a,"%",sep="")</code> formattable will not work acussing <code>numeric</code> is required. </p>

<p>Second problem: When rendering to pdf, such table from the chunk presented is not being properly created. I tried to use direct output from <code>formattable(a,list...)</code>, by <code>print(a)</code>and by <code>print(xtable(a))</code> but did not work in any way. Any hint? </p>