【发布时间】:2018-02-12 22:36:45
【问题描述】:
我正在尝试在 RMarkdown 中创建一个类似于以下示例的表:
---
title: "Example"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r cars, echo=FALSE, message=FALSE, warning=FALSE, results='asis'}
library(Hmisc)
latex(mtcars, file = "", cgroup = c("mpg", "cyl"), n.cgroup = c(1,10))
```
我想将第 2 列到第 10 列分组。关于如何使用 Hmisc 包或任何其他 R 包完成此任务的任何想法?
【问题讨论】: