【发布时间】:2020-01-16 19:22:45
【问题描述】:
如何在 kable 中插入“等于或大于”符号? 在下面的小型 rmarkdown 文档中,我根据一些尝试了两种不同的方法 互联网建议,但都不起作用。我确实尝试了参数“escape = FALSE”但是 它也不起作用。感谢您的任何指点...
title: "Math symbols in column headers"
date: "January 15, 2020"
output: pdf_document
---
```{r}
library(kableExtra)
library(knitr)
a <- structure(list(MLE = c(0.0839, 0.2082, 0.4194, 0.8237, 1.6201
), MME = c(0.0839, 0.2082, 0.4194, 0.8234, 1.6147)), class = "data.frame", row.names = c(NA,
5L))
colnames(a) <- c("abundance of\n White Sharks\n $\\\\geq$ 40 inches","Percentage of \n White shark in
the population\n $\\\\geq{40}$ inches")
```
```{r}
kable(a, "latex", booktabs = T)
```
这就是我得到的......
【问题讨论】:
标签: r r-markdown kable kableextra