Hi,
I have a bunch of Pubmed IDs, and I need to generate citations for them. I know I can retrieve a specific Pubmed record's XML using annotate::pubmed. I also found an online script to transform a set of IDs into a dataframe: https://www.r-bloggers.com/r-function-to-retrieve-pubmed-citations-from-pmid-number/
However, the script seems a little complex, and neither solution offers an easy way to generate formated citations. Are there any libraries out there who would offer such a functionality? Writing my own function would not be very hard, but that sounds like the kind of common problem someone else must have already solved.
Citations in which format?
You can use entrez's edirect cli tool efetch.