[英]Table with kableExtra
I want to make the table as in the picture using kableExtra.我想使用 kableExtra 制作如图所示的表格。
I am trying to use the R code chunk below, but I get unexpected result.我正在尝试使用下面的 R 代码块,但得到了意想不到的结果。 Could you please show me how to fix it?
你能告诉我如何解决它吗?
```{r, echo=FALSE}
library(kableExtra)
df <- data.frame(
Operator = c("`==`", "`!=`", "`>`", "`<`", "`>=`", "`<=`"),
Interpretation = c("Equal to", "Not equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to")
)
df %>% kbl() %>% kable_styling(bootstrap_options = c('striped', 'hover', 'condensed'))
```
This is the closest I could do这是我能做的最接近的
library(kableExtra)
df <- data.frame(
Operator = c("==", "!=", ">", "<", ">=", "<="),
Interpretation = c("Equal to", "Not equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to")
)
df %>%
kbl() %>%
kable_classic(full_width=F, html_font="Cambria") %>%
row_spec(0, bold=TRUE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.