knitrbootstrap

Compact table in html document rmarkdown with kableExtra?

偶尔善良 提交于 2021-01-29 20:17:22
问题 I'm trying to make a 'compact' table in an RMarkdown I've tried a few things, mostly variations on setting a custom css class and providing the custom css class to a code chunk I've tried a lot of variations, all of which I can see flow through to the source code (accessed via knitting the html document, opening in chrome, and cmd + opt + u to view source and inspecting the source) However, I can't work out what's necessary to simply make rows thinner (I believe that's simply reducing cell

Running Code Chunks in R (knitr package)

血红的双手。 提交于 2019-12-24 19:20:17
问题 I'm working on a markdown file I was sent that wants some of the script to be written in code chunks using the knitr package, which I've never used before. The problem I'm running into is that the scripts don't appear to be working when placed in the chunks, but work just fine when I run them outside of that context. Example: sqlite <- dbDriver("SQLite") con <- dbConnect(sqlite,"db/sqlite/table.db") That works. ```{r db_connect} sqlite <- dbDriver("SQLite") con <- dbConnect(sqlite,"db/sqlite

R - knitr:kable - removing individual headers and adding single header on multiple columns

谁说我不能喝 提交于 2019-12-24 08:02:05
问题 R code in Rmarkdown file: col1 <- c("dummydata","dummydata","dummydata") col2 <- c("dummydata","dummydata","dummydata") col3 <- c("dummydata","dummydata","dummydata") col4 <- c("dummydata","dummydata","dummydata") col5 <- c("dummydata","dummydata","dummydata") col6 <- c("dummydata","dummydata","dummydata") col7 <- c("dummydata","dummydata","dummydata") col8 <- c("dummydata","dummydata","dummydata") df1 <- data.frame(col1,col2,col3,col4,col5,col6,col7,col8) kable(df1, format="html",table.attr=