Re: [R] Analyzing Publications from Pubmed via XML

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Tue, 18 Dec 2007 20:39:36 +0000 (UTC)

"Armin Goralczyk" <agoralczyk_at_gmail.com> wrote in news:a695fbee0712180702k1a351b5cxca54d45b81096166_at_mail.gmail.com:

> On 12/18/07, David Winsemius <dwinsemius@comcast.net> wrote:

>> David Winsemius <dwinsemius_at_comcast.net> wrote in
>> news:Xns9A09CA51DB1E4dNOTwinscomcast_at_80.91.229.13:
>>
>> > "Armin Goralczyk" <agoralczyk_at_gmail.com> wrote in
>> > news:a695fbee0712171238g4995040x579e58f52f83376e_at_mail.gmail.com:
>>
>> >> I tried the above function with simple search terms and it worked
>> >> fine for me (also more output thanks to Martin's post) but when I
>> >> use search terms attributed to certain fields, i.e. with [au] or
>> >> [ta], I get the following error message:
>> >>> pm.srch()
>> >> 1: "laryngeal neoplasms[mh]"
>> >> 2:
>>
>> > I am wondering if you used spaces, rather than "+"'s? If so then
>> > you may want your function to do more gsub-processing of the input
>> > string. 
>>
>> I tried my theory that one would need "+"'s instead of spaces, but
>> disproved it. Spaces in the input string seems to produce acceptable
>> results on my WinXP/R.2.6.1/RGui system even with more complex search
>> strings.
>>
>> --
>>

> 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.

-- 
David Winsemius

______________________________________________
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 Tue 18 Dec 2007 - 20:45:21 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 - 10:30:19 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.