[R] eutils query not working

email email8889 at gmail.com
Mon Feb 10 18:55:25 CET 2014


Hi:

I am running the following code to query Pubmed database, but getting
the error "couldn't connect to host".

library(RCurl)
library(XML)
library(tm)

url <- "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?"
q   <- "db=pubmed&term=saunders+nf[au]&usehistory=y"
esearch <- xmlTreeParse(getURL(paste(url, q, sep="")), useInternal = T)

Error in function (type, msg, asError = TRUE)  : couldn't connect to host

How can this problem be solved?

Thanks:
John



More information about the R-help mailing list