"Error: 1: Space required after the Public Identifier 2: SystemLiteral " or ' expected" when running PubMedWorcloud
0
0
Entering edit mode
7.3 years ago
nattzy94 ▴ 60

I am using an R package called 'PubMedWordcloud' and I get the following error when I try to retrieve the abstracts of a large number of PMIDs (Pubmed IDs):

> pmids <- getPMIDsByKeyWords(keys="candida albicans", n=3000)
> abstracts=getAbstracts(pmids)

Space required after the Public Identifier
SystemLiteral " or ' expected
SYSTEM or PUBLIC, the URI is missing

Error: 1: Space required after the Public Identifier
2: SystemLiteral " or ' expected
3: SYSTEM or PUBLIC, the URI is missing

It appears that the problem is the number of PMIDs as I do not face the same issue when I try to retrieve a small number of PMIDs e.g. 10.

Anyone able to shed some light on the error message and how I can fix it?

R • 5.9k views
ADD COMMENT
0
Entering edit mode

magic number seems to be 901 (n) for this function. I tried (n=) 901 and 902 and beyond (1000, 5000,10000). It works till 901 and at 902 it throws the same error. Probably it is better to restrict by year to get below 901.

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.2

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
 [1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C               LC_TIME=en_IN.UTF-8        LC_COLLATE=en_IN.UTF-8    
 [5] LC_MONETARY=en_IN.UTF-8    LC_MESSAGES=en_IN.UTF-8    LC_PAPER=en_IN.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] PubMedWordcloud_0.3.4 dplyr_0.7.2          

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12       XML_3.99-0         assertthat_0.2.0   slam_0.1-40        bitops_1.0-6      
 [6] grid_3.4.1         R6_2.2.2           magrittr_1.5       rlang_0.1.1        stringi_1.1.5     
[11] NLP_0.1-10         bindrcpp_0.2       wordcloud_2.5      RColorBrewer_1.1-2 tools_3.4.1       
[16] stringr_1.2.0      glue_1.1.1         RCurl_1.96-0       parallel_3.4.1     compiler_3.4.1    
[21] tm_0.7-1           pkgconfig_2.0.1    bindr_0.1          tibble_1.3.3
ADD REPLY

Login before adding your answer.

Traffic: 2601 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6