繁体   English   中英

R - 添加对 ggplot2 的 package 依赖的问题

[英]R - issues adding package dependency on ggplot2

R CMD 检查基于对 ggplot2 ZEFE90A8E604A7C68B70A 的依赖性发出警告和错误。 我运行了 install.packages('ggplot2',dep=TRUE),所以我确信我的站点库中有所有依赖项。 我无法解释各种错误/警告消息。

Loading required package: digest
* using log directory 'E:/MYDOCU~1/Projects/WINGED~1/src/trunk/External/R/r-user
/spear.Rcheck'
* using R version 2.13.0 (2011-04-13)
* using platform: i386-pc-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'spear/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'spear' version '1.123.0.0'
* checking package name space information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for .dll and .exe files ... OK
* checking whether package 'spear' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ...Warning
: running command '"E:/MYDOCU~1/Projects/WINGED~1/src/trunk/External/R/R-213~1.0
/bin/i386/Rterm.exe" R_DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\suraj
\AppData\Local\Temp\RtmpStZBF2\Rin53f31589' had status 1
 WARNING
Loading required package: roxygen
Loading required package: digest
Loading required package: testthat
Loading required package: ggplot2
Loading required package: reshape
Loading required package: plyr

Attaching package: 'reshape'

The following object(s) are masked from 'package:plyr':

    rename, round_any

Loading required package: grid
Loading required package: proto
Error in rename(x, .base_to_ggplot) : could not find function "setNames"
Error : unable to load R code in package 'ggplot2'
Error: package 'ggplot2' could not be loaded
Execution halted

It looks like this package (or one of its dependent packages) has an
unstated dependence on a standard package.  All dependencies must be
declared in DESCRIPTION.
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
* checking whether the package can be unloaded cleanly ...Warning: running comma
nd '"E:/MYDOCU~1/Projects/WINGED~1/src/trunk/External/R/R-213~1.0/bin/i386/Rterm
.exe" R_DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\suraj\AppData\Local\
Temp\RtmpStZBF2\Rin5a292f8d' had status 1
 WARNING
Error in rename(x, .base_to_ggplot) : could not find function "setNames"
Error : unable to load R code in package 'ggplot2'
Error: package 'ggplot2' could not be loaded
Execution halted
* checking whether the name space can be loaded with stated dependencies ... OK
* checking whether the name space can be unloaded cleanly ... OK
* checking for unstated dependencies in R code ...Warning: running command '"E:/
MYDOCU~1/Projects/WINGED~1/src/trunk/External/R/R-213~1.0/bin/i386/Rterm.exe" R_
DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\suraj\AppData\Local\Temp\Rtm
pStZBF2\Rin4269541e' had status 1
 WARNING
Error: package 'ggplot2' could not be loaded
Call sequence:
3: stop(gettextf("package '%s' could not be loaded", pkg), call. = FALSE,
       domain = NA)
2: .getRequiredPackages2(pkgInfo, quietly = quietly)
1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE)
Execution halted
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... OK
* checking for unstated dependencies in tests ... OK


编辑
这是描述文件:

Copyright: REMOVED TO PROTECT PRIVATE INFO
Package: spear
Maintainer: REMOVED TO PROTECT PRIVATE INFO
License: file LICENSE
BugReports: REMOVED TO PROTECT PRIVATE INFO
Title: Impliments aspects of the SPEAR process.
LazyData: yes
Type: Package
LazyLoad: yes
Author: REMOVED TO PROTECT PRIVATE INFO
Description: This package impliments aspects of the SPEAR process
    ranging from research to components of the signal generation
    system.
Version: 1.123.0.0
URL: REMOVED TO PROTECT PRIVATE INFO
Date: 2011-05-02
Depends: R (>= 2.12.2), roxygen, testthat, ggplot2, plyr, psych
Collate: 'bivariatecharts.R' 'errorchecker.R' 'utility.R'
    'riskmodeling.R' 'spear-package.R'

答案是更新 plyr。 感谢 Hadley 为我解封。

暂无
暂无

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

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