R 降价 (html) 上的空 table 网格

Empty table grid on R markdown (html)

我的 R markdown 报告将被打印出来。 我需要留下一个空的 6 x 6 方格,以便稍后在打印的报告上手写决定。

这没有产生预期的结果:

library(tidyverse)
library(kableExtra)

TableGrid <- matrix(NA,nrow =6, ncol=6)

options(knitr.kable.NA = '')

TableGrid %>%
  kbl(row.names = NA, col.names = NA, linesep = "") %>%
  kable_styling(full_width = F) %>%
  column_spec( 1, width = "3em", border_left = T, color = "black" ) %>%
  column_spec( 2, width = "3em", border_left = T, color = "black" ) %>%
  column_spec( 3, width = "3em", border_left = T, color = "black" ) %>%
  column_spec( 4, width = "3em", border_left = T, color = "black" ) %>%
  column_spec( 5, width = "3em", border_left = T, color = "black" ) %>%
  column_spec( 6, width = "3em", border_left = T, border_right = T, color = "black" ) %>%
  row_spec( 1, font_size=9, extra_css = "border-bottom: 1px solid; border-top: 1px solid" ) %>%
  row_spec( 2, font_size=9, extra_css = "border-bottom: 1px solid" ) %>%
  row_spec( 3, font_size=9, extra_css = "border-bottom: 1px solid" ) %>%
  row_spec( 4, font_size=9, extra_css = "border-bottom: 1px solid" ) %>%
  row_spec( 5, font_size=9, extra_css = "border-bottom: 1px solid" ) %>%
  row_spec( 6, font_size=9, extra_css = "border-bottom: 1px solid" ) 

有没有办法创建这样一个空网格?
(加分:能不能写得更短一点?)

编辑:
我的代码确实产生了一个 6x6 的网格,但字体大小不控制行高,而且它在纸上看起来被压扁和变小,即不是 square 网格...

使用 base R,您可以在具有固定纵横比 (asp=1) 的绘图中绘制 grid

```{r grid,fig.width=6,fig.asp=1}
par(mar=c(0,0,0,0))
plot(NA, asp=1, xlim=c(0,1),ylim=c(0,1),xaxt="n",yaxt="n",xlab="",ylab="", axes=T)
grid(6,6,lty="solid",col='black')
```