mjwestgate / revtools

Tools to support research synthesis in R
https://revtools.net
51 stars 26 forks source link

.bib import raises 'number of items to replace' warnings #2

Closed DesiQuintans closed 6 years ago

DesiQuintans commented 6 years ago

.bib files raise this warning:

In name_vector[2] <- a$year :
  number of items to replace is not a multiple of replacement length

I've found it occurring with .bibs generated by Web of Science, Scopus, ScienceDirect, and ProQuest (Here is a 10-entry export from Web of Science: savedrecs.zip). Formats .ris and .ciw work fine from these sites, though!

mjwestgate commented 6 years ago

Thanks for this - the problem was that read_bib didn't allow for multiple curly brackets, nor for spaces; so it was fine with "={" as a delimiter but failed with "= {{", for example. I've fixed this and tested it with the file you supplied; if you download the new version it should be fixed, but let me know if it doesn't and I'll have another look.

DesiQuintans commented 6 years ago

Fixed! Kudos for timely bugfix and taking the time to explain the issue.