在Rstudio上运行devtools :: check()会导致0笔记/ 0错误/ 0警告; 但运行R CMD检查给我错误和笔记

我使用Rstudio版本0.99.902和R版本3.3.1(2016-06-21)。

我已经写了一个我想提交给CRAN的包。 当我运行devtools::check()函数(包括–as-cran)时,我成功通过了所有testing没有错误/警告/注释。

虽然当我运行在我的terminal(Ubuntu 15.10)相同,它给了我错误和警告。

运行R CMD build

 R CMD build mypackage //home/akilesh/anaconda2/bin/R: 12: [: Linux: unexpected operator /home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator * checking for file 'mypackage/DESCRIPTION' ... OK * preparing 'mypackage': * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and make files * checking for empty or unneeded directories * building 'mypackage_0.1.0.tar.gz' 

运行R CMD check

 R CMD check mypackages_0.1.0.tar.gz /home/akilesh/anaconda2/bin/R: 12: [: Linux: unexpected operator /home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator * using log directory '/home/akilesh/Desktop/CRAN/final/mypackage.Rcheck' * using R version 3.3.1 (2016-06-21) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file 'mypackage/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'mypackage' version '0.1.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package 'mypackage' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... ERROR /home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator * DONE Status: 1 ERROR See '/home/akilesh/Desktop/CRAN/final/mypackage.Rcheck/00check.log' for details. 

这是我的DESCRIPTION文件

 Package: mypackage Type: Package Title: package title Version: 0.1.0 Author: Akilesh [aut,cr] Maintainer: Akilesh <myemailid@gmail.com> Description: My package description. License: GPL-2 LazyData: FALSE Imports: rvest,dplyr,httr,stringr,jsonlite,glue,xml2 Suggests: knitr RoxygenNote: 6.0.1 Encoding: UTF-8 

我无法理解为什么会发生这种情况。 我仍然可以将我的软件包提交给CRAN,因为它在Rstudio上运行时通过testing, devtools::check() ? 虽然它在Rstudio上运行时通过了所有的testing,但为什么它不通过terminal的testing呢? 它与安装Conda有什么关系?

/home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator的意义是什么/home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator错误?

UPDATE :添加了R的最低版本号,以及所有的import。 徒然。