从LaTex,R中的粘贴单元中删除填充

时间:2017-01-06 23:59:11

标签: r latex

tables包中的粘贴伪函数组合了单元格值,但它也引入了不必要的填充。见这个例子:

---
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tables)
library(dplyr)
```

```{r table, results='asis'}
seed <- 1
iris2 <- iris %>% mutate(Region = factor(sample(c('East', 'West', 'Central'), 150, replace = TRUE)))
tabular((Species + 1) ~ (Region + 1) * Sepal.Length * Paste(Percent(), length, sep = '\\% (', postfix = ')'),
        data = iris2) %>%
  latex %>%
  print
```

enter image description here

注意括号内的填充。我该如何摆脱它?

0 个答案:

没有答案