SHARE
TWEET

Untitled

a guest Jun 26th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require(kableExtra)
  2. require(dplyr)
  3.  
  4. bold_letters = c(1,0,1)
  5. df = cbind.data.frame("Noms" = c("A", "B", "C"), "var1" = c(1,2,3))
  6.  
  7. df %>%
  8.   mutate(Noms = cell_spec(Noms, bold = ifelse(bold_letters==0,FALSE,TRUE))) %>%
  9.   kable(format = "latex", escape = F, row.names = F, align = "c")
  10.      
  11. begin{tabular}{c|c}
  12. hline
  13. Noms & var1\
  14. hline
  15. <span style=" font-weight: bold;    " >A</span> & 1\
  16. hline
  17. <span style="     " >B</span> & 2\
  18. hline
  19. <span style=" font-weight: bold;    " >C</span> & 3\
  20. hline
  21. end{tabular}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top