title: How to convert values of a matrix into percentage without changing the format in R
body: <p>I have a matrix which is <code>res</code></p>
  
  <pre><code> &gt; res
                       [,1]         [,2]       [,3]       [,4]       [,5]
          [1,]  0.025431667  0.024636307 0.02812685 0.02733088 0.02807624
          [2,] -0.005383589  0.000000000 0.02807624 0.02258878 0.02322090
          [3,] -0.002674251 -0.002674251 0.05502400 0.00000000 0.01385476
          [4,]  0.055024000  0.061028259 0.05932779 0.05956794 0.05839394
          [5,]  0.059327790  0.059567938 0.05839394 0.06048811 0.05944368
  </code></pre>
  
  <p>I want to have the results as percentage and keep the data structure unchanged.</p>
  
  <p>When I try something like <code>percent(res)</code> from <code>scales</code> I get a vector instead of a matrix</p>
  
  <pre><code>&gt; percent(res)
   [1] "2.54%"  "-0.54%" "-0.27%" "5.50%"  "5.93%"  "2.46%"  "0.00%"  "-0.27%"
   [9] "6.10%"  "5.96%"  "2.81%"  "2.81%"  "5.50%"  "5.93%"  "5.84%"  "2.73%"
  [17] "2.26%"  "0.00%"  "5.96%"  "6.05%"  "2.81%"  "2.32%"  "1.39%"  "5.84%"
  [25] "5.94%"
  </code></pre>
  
  <p>Any suggestions?</p>