问题与编织Markdown文件和pandoc有关。

huangapple go评论53阅读模式
英文:

Problem with knit Markdown file and pandoc

问题

I am trying to knit my R Markdown file.

>Error running filter C:\Users\Админ\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua:
cannot open C:\Users\Админ\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua: No such file or directory
Error: pandoc document conversion failed with error 83
Execution halted

RStudio and rmarkdown are installed and updated to the latest versions.

The file rmarkdown\rmarkdown\lua\pagebreak.lua exists, I checked.
No idea why it happens.

英文:

I am trying to knit my R Markdown file.

>Error running filter C:\Users\Админ\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua:
cannot open C:\Users\Админ\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua: No such file or directory
Error: pandoc document conversion failed with error 83
Execution halted

RStudio and rmarkdown are installed and updated to lastest versions.

The file rmarkdown\rmarkdown\lua\pagebreak.lua exists, I checked.
No idea why it happens.

答案1

得分: 1

我有类似的问题,并通过设置编码保存为UTF8解决。

  1. 问题与您的文件夹名称不是英文有关。

  2. 如果您的操作系统设置为使用UTF-8,您可以按照以下步骤将项目级别的编码更改为UTF8。

菜单-->工具-->项目-->代码编辑-->文本编码-->UTF8

  1. 如果您尚未解决问题,需要检查您当前的Rstudio编码通过> sessionInfo()查看您的R会话编码。

  2. 如果可能,可以使用list.files('target_file_with_fullpath')来查看文件是否存在。如果您可以在操作系统中找到target_file_with_fullpath,但在R项目会话中找不到,请仔细检查sessionInfo()并确保它们都相同。

关于如何更改R sessionInfo()环境变量,这是另一个话题。

英文:

I have similar issue and solved by setup coding saving encoding to UTF8.

  1. The issue is related to your folder with non-english name.

  2. if your operation system is setup to using utf-8. you can change your project level encoding to utf8 by following steps.

menu --> Tools--> project---> code editing --> Text encoding--> utf8

  1. if you has not solve you need check you current Rstuiod encoding
    by > sessionInfo() to the your R session encoding .

  2. if may list.files('target_file_with_fullpath') to see if the file is exists or not. If you can it the target_file_with_fullpaht in your operation system, but not found in your R project session, pls double check sessionInfo() and change it to make sure both are same.

regarding how to change R sessionInfo() environment variable
, it is another topic.

huangapple
  • 本文由 发表于 2023年5月6日 21:06:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76189058.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定