title: Knit table with kableExtra package not showing desired output format
body: <p>I am trying to knit a table as html ouput in Rmarkdown. When I run the print table chunk in RStudio, I do get the desired output format in the Viewer tab:</p>
  
  <p>However, when I try to knit the whole code to html, the table appears to lose its format in the html document:</p>
  
  <p><a href="https://i.stack.imgur.com/lox6L.png" rel="nofollow noreferrer">Table of html output</a></p>
  
  <p>The code I use to render these html output:</p>
  
  <pre><code>```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = FALSE)
  ```
  
  
  
  ```{r, echo=FALSE, warning=FALSE, message=FALSE}
  #run study
  library(knitr)
  library(broom)
  library(kableExtra)
  source("Load Base.R")
  
  ```
  
  ## FX Performance
  
  
  ```{r, echo=FALSE, results='asis'}
  
  source("functions/functions.R")
  
  temp&lt;-cria_table(df=df.xts.rets, datas = c("2019-10-21","2019-10-01","2019-01-04", "2018-10-25"), row.tablenames = c("WtD", "MtD", "YtD", "12M"),caption="FX Performance as deviation (in %) to benchmark")
  
  kable(temp[-1,],digits = 1,caption = "FX Performance as deviation (in %) to benchmark") %&gt;% kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
  ```
  </code></pre>
  
  <p>the temp data frame is a simple data frame:</p>
  
  <pre><code>x&lt;-sample(0:10, 13, replace = T)
  y&lt;-sample(0:10, 13, replace = T)
  z&lt;-sample(0:10, 13, replace = T)
  
  temp2&lt;-data.frame(cbind(x,y,z))
  temp2&lt;-t(temp2)
  temp2&lt;-as.data.frame(temp2)
  rownames(temp2)&lt;-c("MtD", "YtD", "12M")
  names(temp2)&lt;-c("BRL", "MXN", "COP", "PEN", "CLP", "TRY", "ZAR", "RUB", "IDR", "INR", "SGD", "CNH", 
  "KRW")
  </code></pre>
  
  <p>temp structure:</p>
  
  <pre><code>dput(temp)
  structure(c(NA, 0.245944762916706, -0.894156351362008, 3.08653725521899, 
  NA, 0.498928791459474, 2.18942517241514, 5.89628231017694, NA, 
  0.65225368445716, -3.92645080384256, -6.16331871130317, NA, 0.121208248520244, 
  0.735245304879228, -0.403569989918617, NA, 0.0319232052804264, 
  1.19548773782774, 0.418607196177323, NA, 1.17741658565871, 3.09916586536103, 
  5.1411087783602, NA, 0.29199277703813, -4.26010006701491, -6.85199909276568, 
  NA, -0.446468482414186, 0.0407432119243767, -2.48418064300502, 
  NA, -1.14967013429852, 2.14931978994899, 1.63392653902903, NA, 
  -1.00935707767996, 2.42923572611407, 4.17436117595411, NA, -0.550796158031552, 
  -0.22678585243624, -0.913622930913149, NA, -0.715336967669677, 
  0.351449936516834, -0.544645694784129, NA, -0.4431607587566, 
  -1.17144079153269, -1.13960550555942), .Dim = c(4L, 13L), .Dimnames = list(
      c("WtD", "MtD", "YtD", "12M"), c("BRL", "MXN", "COP", "PEN", 
      "CLP", "TRY", "ZAR", "RUB", "IDR", "INR", "SGD", "CNH", "KRW"
      )))
  </code></pre>