[英]Unknown warning generated in rmarkdown to pdf
一段時間以來,我一直很高興地從 RMarkdown 文件中生成 PDF 文件。 最近,在創建 PDF 文件時,出現了一個我不明白的新警告 -它只出現在 PDF 文件中(即沒有 Z78E6221F6393D1356681DB398F14CZD1Z 文件中顯示相同的消息)。 錯誤是:
## Warning in.is:null(rmarkdown::metadata$output) && rmarkdown::$output
## %in%: 'length(x) = 3 > 1' in coercion to 'logical(1)'
我從來沒有見過像這樣的東西,在谷歌搜索了一段時間后,我沒有發現任何似乎有用的東西。 我在新的 R 會話中嘗試過這個,警告是一樣的。 我所有的軟件包都是最新的,我正在運行 R 版本 4.2.1。
關於如何解決這個問題的任何想法? 或者(因為它“只是一個警告”)如何阻止它在我的 PDF 中生成消息?
作為參考,這里是 .Rmd 文件的 yaml 部分:
---
title: "Title Notebook"
author:
- Name
date: "Last compiled on `r format(Sys.time(), '%d %B %Y')`"
output:
pdf_document:
highlight: tango
keep_tex: yes
number_sections: yes
toc: yes
fig_caption: yes
extra_dependencies:
array: null
caption: null
graphicx: null
siunitx: null
multirow: null
calc: null
tabularx: null
threeparttable: ["para", "online", "flushleft"]
hyperref: null
html_notebook:
number_sections: yes
toc: yes
fig_caption: yes
df_print: paged
html_document:
toc: yes
fig_caption: yes
df_print: paged
classoption: "nopatch"
這是設置塊:
```{r setup, echo = FALSE, message = FALSE, results = 'hide'}
# Packages/Libraries can go here:
# Options
knitr::opts_chunk$set(
echo = TRUE,
# echo = FALSE,
collapse = TRUE,
warning = FALSE,
message = FALSE,
comment = "#>",
fig.retina = 2, # Control using dpi
fig.width = 6, # generated images
fig.pos = "t", # pdf mode
fig.align = "center",
dpi = 300,
out.width = "100%",
dev = "png",
optipng = "-o1 -quiet")
```
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.