title: How to format all numbers in a table in r using kable?
body: <p><a href="https://i.stack.imgur.com/GW7xt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GW7xt.png" alt="Code output"></a></p>
  
  <p>I need to be able to reduce or simplify the numbers in this table. I want only up to 4 decimal places shown and if possible only integers if the number is a whole number. How would I accomplish this?</p>
  
  <pre><code>library(kableExtra)
  x = c(1, 1, 1, 1, 1, 1, 1, 1, 1)
  y = x/2
  z = x/3
  a = data.frame(x, y, z)
  b = t(a)
  c = kable(b, "html", align = "c") %&gt;%
    kable_styling(full_width = F)
  </code></pre>