在 R 包描述中添加引用的格式?

qdr*_*ead 13 r cran

我刚刚向 CRAN 提交了一个 R 包。我收到了这条评论:

If there are references describing the methods in your package, please add these in the description field of your DESCRIPTION file in the form
authors (year) <doi:...>
authors (year) <arXiv:...>
authors (year, ISBN:...)
or if those are not available: <https:...>
with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for auto-linking.
(If you want to add a title as well please put it in quotes: "Title") 
Run Code Online (Sandbox Code Playgroud)

但我认为该description字段仅限于一个段落,这意味着除了该字段中的单个段落之外,您不能包含其他文本。所以我不确定在描述字段中包含引用的确切格式是什么。我的猜测如下,但此格式返回一条注释,指出描述格式错误。

Description: Text describing the package, blah blah blah.
    More text goes here, etc etc etc.
    Foo, B., and J. Baz. (1999) <doi:23232/xxxxx.00>
    Smith, C. (2021) <https://something.etc/foo>
Run Code Online (Sandbox Code Playgroud)

运行时返回的注释R CMD check

checking DESCRIPTION meta-information ... NOTE
Malformed Description field: should contain one or more complete sentences.
Run Code Online (Sandbox Code Playgroud)

这个问题是相关的,但没有令人满意的答案,所以我再次询问。

Ben*_*ker 8

我从Julia Silge 的博客文章开始:

\n
cran <- tools::CRAN_package_db()\ndesc_with_doi <- grep("doi:", cran$Description, value = TRUE)\n
Run Code Online (Sandbox Code Playgroud)\n

这里有些例子:

\n
\n

考虑到蛋白质多序列比对,评估沿序列长度的替换的影响是一项艰巨的任务。“aaSEA”软件包旨在帮助研究人员快速分析蛋白质中单个、多个和相关氨基酸取代引起的性质变化。从多序列比对中识别共同进化位置的方法如以下所述:Pel\xc3\xa9 et al., (2017) <doi:10.4172/2379-1764.1000250>。

\n
\n

或者

\n
\n

使用近似贝叶斯计算 (ABC),在贝叶斯框架下根据故障时间数据估计累积损坏(负载持续时间)模型的参数。评估随机负载曲线下的长期可靠性。Yang、Zidek 和 Wong(2019)<doi:10.1080/00401706.2018.1512900>。

\n
\n

对“https”使用类似的过滤器显示(毫不奇怪)比学术参考文献更通用的网站链接,但例如:

\n
\n

专为预计带有声学标签的动物穿过接收器阵列的研究而设计。该软件包结合了自动分类和检查动物运动的优点以及用户对偏离预期行为的标签进行干预的可能性。三个分析函数(explore()、migration() 和 residency())\\n 允许用户系统地分析数据,从而轻松比较 \\n 不同研究的结果。\\n CJS 计算基于佩里等人。(2012)<https://www.researchgate.net/publication/256443823_Using_mark-recapture_models_to_estimate_survival_from_telemetry_data>。

\n
\n

ArXiv(目前总共 17962 个软件包中只有 24 个包含此类链接):

\n
\n

提供模型拟合和随机图广义超几何系综 (gHypEG) 选择的函数。\\n 要了解如何使用它,请查看小插图以获取快速教程。\\n 请参考 Casiraghi, G., Nanumyan 的用法, V. (2019) doi:10.5281/zenodo.2555300\\n 以及下面列出的相关参考文献。\\n 该软件包基于苏黎世联邦理工学院系统设计主席开发的研究。\\ n Casiraghi, G.、Nanumyan, V.、Scholtes, I.、Schweitzer, F. (2016) <arXiv:1607.02441>.\\n Casiraghi, G.、Nanumyan, V.、Scholtes, I.、Schweitzer, F. . (2017) <doi:10.1007/978-3-319-67256-4_11>.\\n Casiraghi, G., (2017) <arxiv:1702.02048>\\n Casiraghi, G., Nanumyan, V. (2018) ) <arXiv:1810.06495>.\\n Brandenberger, L.、Casiraghi, G.、Nanumyan, V.、Schweitzer, F. (2019) <doi:10.1145/3341161.3342926>\\n Casiraghi, G. (2019) < doi:10.1007/s41109-019-0241-1>。

\n
\n

  • 这让我摆脱了“格式错误的描述”注释!只是要指出,这些示例似乎都没有按照 CRAN 审阅者的建议使用“&lt;&gt;”括号,但我将它们包括在内,因为评论明确指出要这样做。 (2认同)
  • 我做了你建议的搜索。&gt; 4000 个描述包含字符串“&lt;doi:”,只有 6 个描述包含前面没有“&lt;”的“doi:”。所以我猜当您复制粘贴示例时,“&lt;&gt;”只是没有打印。更有意义。 (2认同)