简体   繁体   English

提交包到CRAN:.tar.gz文件

[英]Submitting a package to CRAN: .tar.gz file

I have a package I am ready to submit to CRAN (everything checks out). 我有一个包我准备提交给CRAN(一切都检查出来)。 However, in the spot where it says Choose File, I am unsure what file to choose, as it says it requires a .tar.gz file, which I gather is some kind of compressed file? 但是,在它选择文件的位置,我不确定要选择哪个文件,因为它说它需要一个.tar.gz文件,我收集的是某种压缩文件? Do I need to compress everything into a .tar.gz file? 我是否需要将所有内容压缩为.tar.gz文件? If so, how? 如果是这样,怎么样?

If not, I have a .Rproj file, and various files like namespace and description and license, so it is unclear to me which file to submit. 如果没有,我有一个.Rproj文件,以及各种文件,如命名空间,描述和许可证,所以我不清楚要提交哪个文件。

I apologize if this is a simple question, this is my first package to be submitted. 如果这是一个简单的问题我很抱歉,这是我提交的第一个包。

You have two options here. 你有两个选择。 Use R's command line command: 使用R的命令行命令:

> R CMD build /path/to/package/directory

Or use devtools::build from within R: 或者 R中使用devtools::build

R> devtools::build( "path/to/package/directory" ) 

Both result in a tar.gz file on your local file system. 两者都会在本地文件系统上生成tar.gz文件。 The name will look like: mypackage_[Version].tar.gz 名称将如下所示: mypackage_[Version].tar.gz

It is this file that you load to CRAN. 您加载到CRAN是此文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM