我创建了一个R包。该包的DESCRIPTION文件如下:
Package: Ralgotree
Type: Package
Title: package about securiy information
Version: 1.0
Date: 2013-02-15
Author: algotree
Maintainer: algotree<dinoop@algotree.com>
Description: package about securiy information
License: GPL(>=2)
Suggests: RJSONIO,stringr,RSQLite,bigmemory,Rook,compare,plyr,lubridate,xts
Depends: RJSONIO,stringr,RSQLite,bigmemory,Rook,compare,plyr,lubridate,xts它依赖于其他包,如RJSONIO、stringr等。因此,每当我尝试使用以下命令在其他机器上安装我的包时
R CMD build Ralgotree
R CMD INSTALL Ralgotree它显示以下错误消息:
* installing to library ‘/usr/local/lib/R/site-library’
ERROR: dependencies ‘RJSONIO’, ‘stringr’, ‘RSQLite’, ‘bigmemory’, ‘Rook’, ‘compare’, ‘plyr’, ‘lubridate’, ‘xts’ are not available for package ‘Ralgotree’所以我需要像这个install.packages("RJSONIO")一样安装所有的包。
当我们运行R CMD INSTALL Ralgotree命令时,是否可以安装所有未安装的软件包?谢谢
发布于 2013-10-21 18:24:07
试一下,
install.packages("mypkg", dependencies = TRUE)发布于 2013-10-21 15:27:31
当我运行以下命令时,我没有将其作为参数列表中的一个选项:
R CMD INSTALL --helpinstall.packages R函数确实有一个"dependecies“参数,当该参数为真(或正确的字符向量)时,将从描述文件中收集一个包列表并安装它们。
?install.packageshttps://stackoverflow.com/questions/19488038
复制相似问题