Skip to content

Instantly share code, notes, and snippets.

@sdtaylor
Last active April 26, 2021 21:05
Show Gist options
  • Select an option

  • Save sdtaylor/ade36d4ed108164cf3b2a3c142c5c38b to your computer and use it in GitHub Desktop.

Select an option

Save sdtaylor/ade36d4ed108164cf3b2a3c142c5c38b to your computer and use it in GitHub Desktop.
Delete unneeded bib items
library(bib2df)
x = bib2df('manuscript/sample.bib')
x$ANNOTE=NA
x$MENDELEY.GROUPS=NA
x$MENDELEY.TAGS=NA
x$ABSTRACT=NA
x$FILE=NA
x$KEYWORDS=NA
# drop URL except when there isn't a DOI
x$URL = ifelse(is.na(x$DOI), x$URL, NA)
bib2df::df2bib(x,'manuscript/refs.bib')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment