你好我下面教程这里从希拉里和这里从哈德利韦翰试图创建一个虚拟包。
但是,我的程序包需要一些外部依赖关系XML
,RCurl
在这种情况下,当我运行命令文档时,它将抱怨:
> setwd('/home/datafireball/projects/Rprojects/rgetout/rgetout')
> document()
Error: could not find function "document"
> library(devtools)
> document()
Updating rgetout documentation
Loading rgetout
Loading required namespace: XML
Error in (function (dep_name, dep_ver = NA, dep_compare = NA) :
Dependency package XML not available.
>
这是我的DESCRIPTION
档案。
Package: rgetout
Title: A R package to get all the outlinks for a given URL
Version: 0.1
Authors@R: "Eric Cartman <[email protected]> [aut, cre]"
Description: This package is intended to include as much web extraction functionality as much as possible. It starts with one function. getout will extract
all the outlinks for a given URL with a user-agent that you can customize.
Depends: R (>= 3.0.2)
Imports:
XML,
RCurl
License: MIT
LazyData: true
如果您想获得更多信息,这是源代码github repo。
假设您在开发程序包时将具有所需的工具/依赖项。
utils::install.packages
有一个dependencies参数,该参数将尝试安装软件包所依赖的/的卸载软件包(以它们依赖的方式(建议/ depends / linkingTo))。
devtools::install_github
将表现类似。
安装软件包并将其记录为开发的组成部分是安静的不同活动。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句