Collate field in package Description

I apologize as I know that this answer is likely in the manuals for writing an R package but in my reading and looking at other package's Collate fields I can't figure out 100% what this field is for. In plain language (mine is English) what does the Collate field in the Description file of a package do? What would one want to put there?


I think it comes from a time and situation when the order in which the files in the R/ directory were sourced (as opposed to the lexicographic default) still mattered. A similar reason for why the .onLoad() function is often in a file named zzz.R .

For what it is worth, not one of my packages uses the "Collate:" field in DESCRIPTION.

Edit: And as we're fond of empirical measures, here is a quick grep on a machine with all CRAN sources:

$ grep ^Collate */DESCRIPTION | wc -l
292
$ ls -1 */DESCRIPTION | wc -l
3779

So that is 7.7% of all packages. I really would not worry about this unless you really must.

链接地址: http://www.djcxy.com/p/71152.html

上一篇: 如何找出在R中加载哪个软件包版本?

下一篇: 在包中描述字段