download_metadata(treebase)
download_metadata()所属R语言包:treebase
Download the metadata on treebase using the OAI-MPH interface
下载元数据OAI-MPH接口的使用上treebase
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Download the metadata on treebase using the OAI-MPH interface
下载元数据OAI-MPH接口的使用上treebase
用法----------Usage----------
download_metadata(query = "",
by = c("all", "until", "from"), curl = getCurlHandle())
参数----------Arguments----------
参数:query
a date in format yyyy-mm-dd
日期格式YYYY-MM-DD
参数:by
return all data "until" that date, "from" that date to current, or "all"
返回的所有数据“,直到”该日起,该日“,从”当前,或“全部”
参数:curl
if calling in series many times, call getCurlHandle() first and then pass the return value in here. Avoids repeated handshakes with server.
如果调用的系列很多次,请致电getCurlHandle()的返回值,然后通过在这里。避免重复握手服务器。
Details
详细信息----------Details----------
query must be#' download_metadata(2010-01-01, by="until") all isn't a real query type, but will return all trees regardless of date
查询必须是#download_metadata(2010-01-01,=“,直到”)是不是一个真正的查询类型,但将返回所有的树木,不论日期
实例----------Examples----------
## Not run: [#不运行:]
Near <- search_treebase("Near", "author", max_trees=1)
metadata(Near[[1]]$S.id)
## or manualy give a sudy id[#或手动%给一个sudy的ID]
metadata("2377")
### get all trees from a certain depostition date forwards ##[##所有的树木一定depostition日转发##]
m <- download_metadata("2009-01-01", by="until")
## extract any metadata, e.g. publication date:[#提取元数据,例如出版日期:]
dates <- sapply(m, function(x) as.numeric(x$date))
hist(dates, main="TreeBase growth", xlab="Year")
### show authors with most tree submissions in that date range[##展示作者与大多数在该日期范围内的树意见书]
authors <- sapply(m, function(x){
index <- grep( "creator", names(x))
x[index]
})
a <- as.factor(unlist(authors))
head(summary(a))
## Show growth of TreeBASE[#显示经济增长的TreeBASE]
all <- download_metadata("", by="all")
dates <- sapply(all, function(x) as.numeric(x$date))
hist(dates, main="TreeBase growth", xlab="Year")
## make a barplot submission volume by journals[#做一个barplot的提交量的期刊]
journals <- sapply(all, function(x) x$publisher)
J <- tail(sort(table(as.factor(unlist(journals)))),5)
b<- barplot(as.numeric(J))
text(b, names(J), srt=70, pos=4, xpd=T)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|