R CMD安装——构建包——>“缺少简介”

时间:2023-01-18 07:39:28

Problem: C:\>Rcmd.exe INSTALL --build --library=C:/Users/local_aphalo/Documents/R/win-library/3.0 photobiology

问题:C:\ > Rcmd。exe安装—构建—library=C:/Users/local_aphalo/Documents/R/win-library/3.0 photobiology

C:\>Rcmd.exe INSTALL --build --library=C:/Users/local_aphalo/Documents/R/win-library/3.0 photobiology_0.2.6.tar.gz

C:\ > Rcmd。exe安装—构建—library=C:/Users/local_aphalo/Documents/R/win-library/3.0 photobiology_0.6 tar.gz

The first command (as used by RStudio) builds a ZIP file that is missing the vignettes.

第一个命令(由RStudio使用)构建了一个丢失了vignettes的ZIP文件。

The second command builds a ZIP that includes the vignettes.

第二个命令构建一个包含小插图的ZIP文件。

Using R CMD instead of Rcmd.exe makes no difference. The .tar.gz was built immediately before attempting to build the .zip file, from exactly the same source files, from within RStudio (which uses Rcmd.exe build photobiology).

用Rcmd代替Rcmd。exe都没有区别。. tar。gz是在尝试从完全相同的源文件(使用Rcmd)构建.zip文件之前立即构建的。exe构建光生物学)。

The vignettes are coded in .Snw files using knitr, documentation and NAMESPACE use ROxygen2. The problem happens on all of the packages that I have tried to build, but they are very similarly coded. Only one of them uses Rcpp.

小插图使用knitr、文档和名称空间ROxygen2在. snw文件中进行编码。问题发生在我尝试构建的所有包上,但是它们的编码非常相似。其中只有一个使用Rcpp。

When installing the package for use from within RStudio, installing from .tar.gz installs vignettes just fine. If installing from .zip, whether vignettes get installed or not, depends on whether the .zip files contains them or not (which depends on which of the two commands at the top of this message was used to build the .zip file).

当从RStudio中安装要使用的包时,从.tar中安装。gz安装了小插图。如果从.zip安装,不管小插图是否安装,都取决于.zip文件是否包含它们(这取决于在此消息顶部的两个命令中哪个用于构建.zip文件)。

I am using R 3.0.1, and also tried a couple of R 3.0.1 patched builds a few days back. I am mostly using Windows 7 (both 32 bit, and 64 bit), I tried once under Ubuntu 64bit, and the problem is reproducible. I first noticed the problem when using RStudio (0.97 and 0.98) and posted a message in the RStudio forum, but have received no answer in a couple of weeks. I have found at least another relatively old post about this problem in the RStudio website forum, but it has not been answered. Today, I investigated a bit further, and the problem is clearly not related to RStudio, as I can reproduce it through the command line.

我正在使用r3.0.1,并且在几天前尝试了一些r3.0.1补丁。我大部分时间都在使用Windows 7(32位和64位),我在Ubuntu 64bit下试过一次,问题是可重复的。在使用RStudio(0.97和0.98)时,我第一次注意到这个问题,并在RStudio论坛上发布了一条消息,但在几周内没有收到任何回复。关于这个问题,我在RStudio网站论坛上至少找到了另一个相对较老的帖子,但还没有得到回复。今天,我进一步研究了一下,这个问题显然与RStudio无关,因为我可以通过命令行复制它。

The question is: Is this behavior a feature? a bug? or I am missing just an option in the command used?

问题是:这种行为是一种特征吗?一个错误?或者我只是在使用的命令中缺少一个选项?

Of course, I can easily work around the problem at the command line by using the .tar.gz file to build the .zip file, but as I think the preferred way of building a package is by just supplying the package name as argument.

当然,我可以通过使用.tar轻松解决命令行中的问题。构建.zip文件的gz文件,但是我认为构建包的首选方法是只提供包名作为参数。

Thanks for any insights on the origin of this problem.

感谢您对这个问题起源的任何见解。

1 个解决方案

#1


3  

I think this is a feature:

我认为这是一个特点:

  • if you're installing from source, vignettes are always built

    如果是从源代码安装,则始终构建小插图

  • if you're installing from a binary, they're not built, and will only be available if they were built when the binary was made

    如果您正在从二进制文件中安装,那么它们不是构建的,并且只有在构建二进制文件时才可用

This approach means that you can distribute vignettes in binary packages to people who might not be able to build them from source.

这种方法意味着您可以在二进制包中向可能无法从源代码构建它们的人分发小插图。

#1


3  

I think this is a feature:

我认为这是一个特点:

  • if you're installing from source, vignettes are always built

    如果是从源代码安装,则始终构建小插图

  • if you're installing from a binary, they're not built, and will only be available if they were built when the binary was made

    如果您正在从二进制文件中安装,那么它们不是构建的,并且只有在构建二进制文件时才可用

This approach means that you can distribute vignettes in binary packages to people who might not be able to build them from source.

这种方法意味着您可以在二进制包中向可能无法从源代码构建它们的人分发小插图。