我正在尝试使用roxygen2记录R包中的一些数据集.仅考虑其中一个:
mypkg/data/CpG.human.GRCh37.RDaCpG.human.GRCh37和一个名为:的文件mypkg/R/cpg-data.R,其中包含:
#' @name CpG.human.GRCh37
#' @title CpG islands - human - genome build: GRCh37/hg19
#' @description This data set list the genomic locations of human CpG islands,
#' with coordinates based on the GRCh37 / hg19 genome build.
#' @docType data
#' @usage CpG.human.GRCh37
#' @format a \code{RangedData} instance, 1 row per CpG island.
#' @source UCSC Table Browser
#' @author Mark Cowley, 2012-03-05
#' @export
NULL
Run Code Online (Sandbox Code Playgroud)当我进行roxygenize时,会创建它mypkg/man/CpG.human.GRCh37.Rd,包含:
\docType{data}
\name{CpG.human.GRCh37}
\alias{CpG.human.GRCh37} …Run Code Online (Sandbox Code Playgroud) 我想将一个简单的受密码保护的Web门户镜像到一些我希望保持镜像和最新的数据.本质上这个网站只是一个目录列表,其中数据被组织到文件夹中,我并不关心保留html文件和其他格式元素.但是有一些巨大的文件类型太大而无法下载,所以我想忽略这些.
使用该wget -m -R/--reject标志几乎可以实现我想要的,除了所有文件都被下载,然后如果它们匹配-R标志,那么它们将被删除.
这是我正在使用的方式wget:
wget --http-user userName --http-password password -R index.html,*tiff,*bam,*bai -m http://web.server.org/
Run Code Online (Sandbox Code Playgroud)
这会产生这样的输出,确认被下载的文件(index.html)(a)被下载,然后(b)被删除:
... -
2012-05-23 09:38:38-- http://web.server.org/folder/
重用现有的连接到web.server.org:80.
发送HTTP请求,等待响应... 401需要授权
重用现有的web.server.org:80连接.
发送HTTP请求,等待响应... 200 OK
长度:2677(2.6K)[text/html]
保存到:`web.server.org/folder/index.html'100% [======== ================================================== ================================================== ==========>] 2,677 - .- K/s为0最后修改的标题丢失 - 时间戳已关闭.
2012-05-23 09:38:39(328 MB/s) - `web.server.org/folder/index.html'已保存[2677/2677]
正在删除web.server.org/folder/index.html应该被拒绝.
...
有没有办法强制wget在下载之前拒绝该文件?
有没有我应该考虑的替代方案?
此外,401 Authorization Required尽管提供了用户名和密码,为什么我会为每个下载的文件收到错误.这就像wget尝试在尝试用户名/密码之前每次连接未经过身份验证一样.
谢谢,马克