Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
##grid.Call中的警告(C_textBounds,as.graphicsAnnot(x$label),x$x,x$y,:_R_R Markdown_Knitr - Fatal编程技术网

##grid.Call中的警告(C_textBounds,as.graphicsAnnot(x$label),x$x,x$y,:

##grid.Call中的警告(C_textBounds,as.graphicsAnnot(x$label),x$x,x$y,:,r,r-markdown,knitr,R,R Markdown,Knitr,当我将我的R Markdown文档编织成pdf时,我的一些页面出现了此错误 ##网格中的警告。调用(C#u textBounds,as.graphicsAnnot(x$label),x$x,x$y,:请参见下面的屏幕截图。可能是什么问题?我没有使用任何新字体,笔记本电脑是mac。您可能需要在以前的代码块(或文档中的第一个代码块)中设置pdf.options(encoding=)。由于您没有提供可复制的示例,我们无法判断哪种编码适合您的情况。您正在使用;由于某些原因,此字符存在特定的错误。请参阅

当我将我的R Markdown文档编织成pdf时,我的一些页面出现了此错误
##网格中的警告。调用(C#u textBounds,as.graphicsAnnot(x$label),x$x,x$y,
:请参见下面的屏幕截图。可能是什么问题?我没有使用任何新字体,笔记本电脑是mac。

您可能需要在以前的代码块(或文档中的第一个代码块)中设置
pdf.options(encoding=)
。由于您没有提供可复制的示例,我们无法判断哪种编码适合您的情况。

您正在使用;由于某些原因,此字符存在特定的错误。请参阅

 R -e 'library(ggplot2); qplot(Sepal.Length, Petal.Length, data=iris, main="Big–booté")'
open Rplots.pdf

如您所见,“é”字符处理正确,但en破折号变成了点。可能一些R代码试图通过将字符折叠回一些过时的、特定于平台的字符集来混淆问题;而在特殊字符(如en破折号)上失败

修复了该问题(至少在Mac OS X和最新的R版本4.0.3上):

或者就Rmarkdown而言

R -e 'rmarkdown::render("foo.Rmd", "pdf_document", output_file="foo.pdf", runtime = "static", output_options = list(dev = "cairo_pdf"))'

在专栏中,有一些特定的字符抛出了这个错误。我更改了它,现在它可以正常工作了
R -e 'rmarkdown::render("foo.Rmd", "pdf_document", output_file="foo.pdf", runtime = "static", output_options = list(dev = "cairo_pdf"))'