DESCRIPTION元信息中的错误

时间:2016-05-29 21:01:38

标签: r r-package

我在R中的包开发方面有点新意,我不确定这是否是一个常见的错误。我正在开发一个新的软件包,可以在GitHub上找到:https://github.com/jroberayalas/ahnr。我在OS X Yosemite [平台:x86_64-apple-darwin13.4.0(64位)]的Mac上使用R版本3.3.0(2016-05-03)。

当我检查包时,我的DESCRIPTION元信息出错1。它没有提供任何有意义的细节,我不确定这是什么意思。

下面是我按CMD + Shift + E时得到的输出。我觉得奇怪的是,我认为包被检查两次:第一次显示checking DESCRIPTION meta-information ... OK,第二次显示checking DESCRIPTION meta-information ... ERROR。我不知道这是否应该有效。我必须补充一点,GitHub存储库存储在我的Google云端硬盘文件夹中,以便存储在云中,所以我不确定这是否会导致错误。

During the initialization - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_COLLATE failed, using "C" 
3: Setting LC_TIME failed, using "C" 
4: Setting LC_MESSAGES failed, using "C" 
5: Setting LC_MONETARY failed, using "C" 
Updating ahnr documentation
Loading ahnr
Setting env vars ---------------------------------------------------------------
CFLAGS  : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building ahnr ------------------------------------------------------------------
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \ 
--no-save --no-restore --quiet CMD build '/R/ahnr' --no-resave-data --no-manual 

During the initialization - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* checking for file '/R/ahnr/DESCRIPTION' ... OK
* preparing 'ahnr':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'ahnr_0.0.0.9000.tar.gz'

Setting env vars ---------------------------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_: FALSE
Checking ahnr ------------------------------------------------------------------
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \ 
--no-save --no-restore --quiet CMD check  \ 
'/var/folders/d0/h1123zw10cl569yx765cpxp00000gn/T//RtmpvxgS8q/ahnr_0.0.0.9000.tar.gz'  \ 
--as-cran --timings --no-manual 

During the initialization - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* using log directory '/R/ahnr.Rcheck'
* using R version 3.3.0 (2016-05-03)
* using platform: x86_64-apple-darwin13.4.0 (64-bit)
* using session charset: ASCII
* using options '--no-manual --as-cran'
* checking for file 'ahnr/DESCRIPTION' ... OK
* this is package 'ahnr' version '0.0.0.9000'
* 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 'ahnr' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... ERROR
During the initialization - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
* DONE
Status: 1 ERROR
checking DESCRIPTION meta-information ... ERROR
During the initialization - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 

See
  '/R/ahnr.Rcheck/00check.log'
for details.

R CMD check results
1 error  | 0 warnings | 0 notes

R CMD check succeeded 

我的描述文件非常简单:

Package: ahnr
Title: R implementation of the Artificial Hydrocarbon Networks
Version: 0.0.0.9000
Authors@R: person("Jose", "Ayala", email = "#####@##.#", role = c("aut", "cre"))
Description: This packages implements the algorithm to create artificial hydrocarbon
    networks for data modelling.
Depends:
    R (>= 3.3.0)
License: GPL-3 | file LICENSE
Encoding: UTF-8
LazyData: true
Imports:
    matrixcalc,
    pracma
Suggests:
    testthat
RoxygenNote: 5.0.1
URL: https://github.com/jroberayalas/ahnr
BugReports: https://github.com/jroberayalas/ahnr/issues

非常感谢任何帮助!

2 个答案:

答案 0 :(得分:0)

根据编写R扩展手册https://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file,您应该避免提及包裹的名称,甚至包括单词包。您可以在描述的开头尝试不使用This package。它应该为你解决问题,因为我没有看到任何其他问题。

答案 1 :(得分:0)

感谢@DKangeyan,似乎问题与R中的LOCALE功能有关。我按照说明herehere解决了问题。