在 R 包/.Rd 文件中搜索 unicode 字符 [英] Search unicode character in R package/.Rd file
问题描述
如何在 R 包或特定文件中搜索特定的 unicode 字符(我使用的是 RStudio IDE).
How can I search for a specific unicode character in an R package or a specific file (I am using the RStudio IDE).
我正在尝试向 CRAN 提交一个包.所有检查都通过,除了:
I am trying to submit a package to CRAN. All checks pass except for:
W checking PDF version of manual (49.5s)
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! Package inputenc Error: Unicode character (U+008D)
(inputenc) not set up for use with LaTeX.
因此,当所有 Rd 文件都编译为一个 pdf 时,似乎存在一个有问题的字符.为了解决这个问题,我需要浏览我所有的 .Rd 文件并找到字符 U+008D,反向换行符).
So when all Rd files are compiled to one pdf there seems to be a problematic character. To fix this I need to go through all my .Rd files and find character U+008D, the reverse line feed character).
由于它是一个鬼鬼祟祟的角色,我不确定 RStudio 编辑器是否显示它.
Since it is sort of a sneaky character, I am not sure if the RStudio editor even displays it.
有什么想法吗?
- 我无法控制乳胶引擎,因为错误发生在一台 CRAN 机器上
推荐答案
虽然这不是我问题的直接答案,但我会回答解释错误发生的地方.
Although this is not a direct answer to my question, I'll answer to explain where the error occured.
问题是一个 bibtex 条目.我正在使用 Rdpack 包将 bibtex 条目包含在我的 .Rd 文件.
The problem was a bibtex entry. I'm using the Rdpack package to include bibtex entries in my .Rd files.
其中一个条目有一个 bibtex 不喜欢的符号(一些重音符号).删除 bibtex 文件中的字符修复了它.
One of the entries had a symbol that bibtex didnt like (some accent character). Removing the character in the bibtex file fixed it.
这篇关于在 R 包/.Rd 文件中搜索 unicode 字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!