Updating references used on documents

I use Zotero to store references and I have added some on documents but later on edited on Zotero (usually only adding the DOI).

If I add them again I’ll have two references with the same key (And I think the first one, aka the oldest without the DOI will be used) or duplicated references with an increasing letter: ref1a, ref1b, ref1c…

However, I haven’t found any way to update the references on the .bib files were the references are stored. Is there any solution via RefManageR, bibtex or bib2df to update the references automatically or should I manually add the fields for each entry?

This is the “recommended” way via RefManageR:

  refs <- RefManageR::ReadZotero(
    group = "<group-id>",
    .params = list(limit = 100) # or whatever
  RefManageR::WriteBib(refs, "my.bib")

… but it does not (currently) work. My present approach is to export from local zotero client - a couple of clicks instead of code, but not much more work.

1 Like

Thanks Mark!
I don’t have a dedicated folder for each project and I have most of the references directly on “My library” and I wouldn’t like to add all the references to all the projects when I want to update the references.
Additionally, and this might be a problem on the RStudio visual editor markdown side I found out that some references do not use the same tag on the Rmd than on Zotero…