ropensci / bib2df

Parse a BibTeX file to a tibble
https://docs.ropensci.org/bib2df
99 stars 22 forks source link

parsing problems: = symbol #17

Closed rungec closed 5 years ago

rungec commented 6 years ago

Hi, I've run into a problem reading in references where abstract field contains an equals symbol = the preceeding abstract text is read in as a column header. e.g. "high genetic differentiation (F st = 0.043" ends up as a new column header "HIGH.GENETIC.DIFFERENTIATION..F.ST"

emilioxavier commented 6 years ago

I have not been able to recreate this problem. For me, abstracts of interest often have equals signs =. @rungec could you please provide an example file?

Thank you

rungec commented 6 years ago

Weird! Here's the file I was using. It's a bibtex download from Web of Science WOS_2_core_references_a.zip

emilioxavier commented 6 years ago

Thank you @rungec for the bibtex file. There appears to be 500 references within the file. Three references do not include an abstract; once imported using bib2df. Checking these references within the original bibtex file indicates they original did not have an abstract. Based on your above error, it is entry bibkey == ISI:000414148900015 causing you trouble but this entry appears to be complete after being read into R.

I am using a forked and patched version of bib2df (the pull request is awaiting approval) and did not experience any errors.

ottlngr commented 6 years ago

@rungec This problem should be fixed now. I added unit tests that keep an eye on this scenario. Please try the dev branch of bib2df:

devtools::install_github("ropensci/bib2df", ref = "dev")

ottlngr commented 5 years ago

Merged into master.