1
是否有任何方法可以在rmarkdown中創建pander表,以便NA
(例如下表)的單元顯示爲完全空白?Pander表中的空白單元
---
title: "Untitled"
author: "Llew Mills"
date: "24 June 2016"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(fig.width=12, fig.height=8, fig.path='Figs/',
echo=FALSE, warning=FALSE, message=FALSE, dev = 'pdf')
```
``` {r stuff}
library(pander)
m1 <- sample(1:10,6)
m2 <- sample(1:10,6)
m3 <- sample(1:10,6)
mR <- c("Group A", NA, NA, "Group B", NA, NA)
df <- data.frame(mR,m1,m2,m3)
pander(df, justify = "right", style = "simple")
```
神奇。打開了大量的可能性。 Thankyou @daroczig! – llewmills