问题
I am using Rstudio-version 0.99.902 and R-version 3.3.1 (2016-06-21).
I have written a package that I would like to submit to CRAN. When I run the devtools::check()
functions (--as-cran included), I successfully pass all tests, with NO errors/warnings/notes.
Although when I run the same on my terminal (ubuntu 15.10), it gives me errors and warnings.
Running 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’
Running 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.
This is my DESCRIPTION
file
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
I am unable to understand why this is happening. Can I still submit my package to CRAN, since it passes the tests while running on Rstudio, devtools::check()
? And while it passes all test while running on Rstudio, why isn't it passing the tests on the terminal? Does it have something to do with installing Conda
?
What is the significance of the /home/akilesh/anaconda2/lib/R/bin/R: 12: [: Linux: unexpected operator
error?
UPDATE
: Added the minimum version numbers for R, and all Imports as well. In vain.
来源:https://stackoverflow.com/questions/44740211/running-devtoolscheck-on-rstudio-results-in-0-notes-0-errors-0-warnings-b