小编蔡佳諭*_*蔡佳諭的帖子

是否可以在没有 kableExtra 的情况下使用 kable 更改列宽?

这个问题继续。我想修改结果的列宽,但不使用kableExtra. 如果我加载kableExtra包,图像将成为文本格式。

这是代码:

---
title: "Untitled"
output: 
    pdf_document:
        latex_engine: xelatex
---
```{r echo=FALSE, results='hide', warning=FALSE, message=FALSE}
## Load modules
library(dplyr)
library(tidyr)
library(ggplot2)
options(tinytex.verbose = TRUE)
## Create a local function to plot the z score
varianceChart <- function(df, personNumber) {
  plot <- df %>%
         filter(n == personNumber) %>%
         ggplot() +
         aes(x=zscore, y=0) +
         geom_rect(aes(xmin=-3.32, xmax=-1.96, ymin=-1, ymax=1), fill="orange2", alpha=0.8) + 
         geom_rect(aes(xmin=1.96, xmax=3.32, ymin=-1, ymax=1), fill="olivedrab3", alpha=0.8) +
         geom_rect(aes(xmin=min(-4, zscore), xmax=-3.32, ymin=-1, ymax=1), fill="orangered3") + …
Run Code Online (Sandbox Code Playgroud)

r xelatex knitr r-markdown kable

3
推荐指数
1
解决办法
1118
查看次数

标签 统计

kable ×1

knitr ×1

r ×1

r-markdown ×1

xelatex ×1