Re: [R] Analyzing Publications from Pubmed via XML

From: Armin Goralczyk <agoralczyk_at_gmail.com>
Date: Mon, 17 Dec 2007 15:18:03 +0100

On Dec 15, 2007 6:31 PM, David Winsemius <dwinsemius_at_comcast.net> wrote:

> After quite a bit of hacking (in the sense of ineffective chopping with
> a dull ax), I finally came up with:
>
> pm.srch<- function (){
> srch.stem<-"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term="
> query<-readLines(con=file.choose())
> query<-gsub("\\\"","",x=query)
> doc<-xmlTreeParse(paste(srch.stem,query,sep=""),isURL = TRUE,
> useInternalNodes = TRUE)
> return(sapply(c("//Id"), xpathApply, doc = doc, fun = xmlValue) )
> }
>
> pm.srch() #choosing the search-file
> //Id
> [1,] "18046565"
> [2,] "17978930"
> [3,] "17975511"
> [4,] "17935912"
> [5,] "17851940"
> [6,] "17765779"
> [7,] "17688640"
> [8,] "17638782"
> [9,] "17627059"
> [10,] "17599582"
> [11,] "17589729"
> [12,] "17585283"
> [13,] "17568846"
> [14,] "17560665"
> [15,] "17547971"
> [16,] "17428551"
> [17,] "17419899"
> [18,] "17419519"
> [19,] "17385606"
> [20,] "17366752"

I tried the example above, but only the first 20 PMIDs will be returned. How can I circumvent this (I guesss its a restraint from pubmed)?

-- 
Armin Goralczyk, M.D.
--
Universitätsmedizin Göttingen
Abteilung Allgemein- und Viszeralchirurgie
Rudolf-Koch-Str. 40
39099 Göttingen
--
Dept. of General Surgery
University of Göttingen
Göttingen, Germany
--
http://www.chirurgie-goettingen.de
______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 17 Dec 2007 - 14:23:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Dec 2007 - 18:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.