I have just discovered a package for R to retrieve abstract from pubmed, which is wonderful. But I keep receive an warning message during data retrieval:
R2009 <- pubmed.search("R+package[tiab]+AND+2009/01/01[dp]:2009/12/31[dp]",dest="temp",format="ris")
Warning message:
In download.file(e.query, dest = temp, quiet = TRUE) :
downloaded length 2565 != reported length 200
> nrow(as.data.frame(R2009))
[1] 82
I have manually do a search in pubmed, and found the same number of article (82).
I wonder what the warning message means, anything needs to be fixed here? Thanks.
It means that whatever file
pubmed.search()downloaded, it was of length2565(bytes I presume?) but the length reported during connection negotiations was just200bytes.I don’t know pub med that well, but one could well imagine a situation where the data file that contains the search results being downloaded is generated on the fly and the final file size is not known, so a dummy size is reported first but the actual download stream grows beyond this size. You can visually see this when using a browser from time to time – sometimes the browser doesn’t know how big the download is so doesn’t report a time to completion, just the amount of data downloaded.