开发者

How to search through pubmed using R, as is possible with Ruby?

I just came by the Ruby function

ncbi.esearch_count

Used in a recent post here (regarding the use of the word noval in publications), used to search in pubmed.

And I wonder how can it be done using R (via maybe Rcurl, or other library(XML) functions)开发者_如何学Go?

Thanks.


There is an article by Duncan Temple Lang, arguably the Dean of R Web Services, that was apparently destined for the Journal of Statistical Software illustrating accessing PubMed with RCurl. I can only find it at the Omegahat website:

"R as a Web Client – the RCurl package"


The Ruby function is part of the BioRuby library, which provides a wrapper around the NCBI EUtils. There was some brief discussion at the R Bioconductor mailing list regarding a wrapper for R, but I don't think that it went anywhere.

It is possible to use EUtils using RCurl and XML as you suggest. You construct the correct query URL, fetch the results using RCurl and parse using XML. I'd recommend reading the documentation in the second link for details about URLs; it is not very difficult. However, I don't think that there is a pure EUtils equivalent of BioRuby's very useful esearch_count().

EDIT: may be wrong on that last point, there is EGQuery.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜