Re: [R] Analyzing Publications from Pubmed via XML

From: Armin Goralczyk <agoralczyk_at_gmail.com>
Date: Wed, 19 Dec 2007 10:22:38 +0100

On Dec 18, 2007 9:39 PM, David Winsemius <dwinsemius_at_comcast.net> wrote:
> "Armin Goralczyk" <agoralczyk@gmail.com> wrote in
> news:a695fbee0712180702k1a351b5cxca54d45b81096166_at_mail.gmail.com:
>
> > It's not the spaces, the problem is the tag (sorry that I didn't
> > specify this), or maybe the string []. I am working on a Mac OS X 10.4
> > with R version 2.6. Is it maybe a string conversion problem? In the
> > following warning strings in the html adress seem to be different:
> > Fehler in .Call("RS_XML_ParseTree", as.character(file), handlers,
> > as.logical(ignoreBlanks), :
> > error in creating parser for
> > http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&ter
> > m=laryngeal neoplasms[mh]
> > I/O warning : failed to load external entity
> > "http%3A//eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi%3Fdb=pubme
> > d&term=laryngeal%20neoplasms%5Bmh%5D"
>
> I do not have an up-to-date version of R on my Mac, since I have not yet
> upgraded to OSX10.4. I can try with my older version of R, but failure
> (or even success) with versions OSX-10.2/R-2.0 is not likely to be very
> informative. If you will post an example of the input that is resulting
> in the error, I can try it on my WinXP machine. If we cannot reproduce it
> there, then it may be more appropriate to take further questions to the
> Mac-R mailing list. The error message suggests to me that the fault lies
> in the connection phase of the task.
>

Example:

> esearch <- function (term){

+ 	srch.stem <- "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?"
+ 	srch.mode <- "db=pubmed&retmax=10000&retmode=xml&term="
+ 	doc <-xmlTreeParse(paste(srch.stem,srch.mode,term,sep=""),isURL = TRUE,
+ 		useInternalNodes = TRUE)
+ 	sapply(c("//Id"), xpathApply, doc = doc, fun = xmlValue)
+ 	}

>
> term <- 'meyer'
> pmid <- esearch(term) #search successfull
>
> term <- 'meyer[au]'
> pmid <- esearch(term)

Fehler in .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlanks), :
  error in creating parser for
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmax=10000&retmode=xml&term=meyer[au]
>

I/O warning : failed to load external entity "http%3A//eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi%3Fdb=pubmed&retmax=10000&retmode=xml&term=meyer%5Bau%5D"
>

Seems to be a Mac problem. I will post on the Mac-R mailing list. Thanks

-- 
Armin

______________________________________________
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 Wed 19 Dec 2007 - 09:26:33 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 Wed 19 Dec 2007 - 09: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.