Remove padding from pasted cells in LaTex, R

做~自己de王妃 提交于 2019-12-24 07:59:15

问题


The Paste pseudo-function in the tables package combines cell values, but it also introduces unnecessary padding. See this example:

---
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
```

Notice the padding inside the parentheses. How do I get rid of that?

来源:https://stackoverflow.com/questions/41516300/remove-padding-from-pasted-cells-in-latex-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!