How to merge BibTex files into R

2

How can I merge several .bib extension files into one single file in R?

I'm learning how to use the Bibliometrix package, and I need to merge 99 .bib files into a single file.

Thanks, guys.

    
asked by anonymous 08.07.2016 / 22:23

1 answer

1

The solution to your problem is even simpler than the code Daniel Falbel suggested. You do not even need the bibliometrix package because it reads the files as text itself. What you need is to just read the files, merge into one object and write again. For example:

files <- list.files(path = "C:/Users/Eu/MeusBibs", pattern = "\.bib")
bibdata <- lapply(files, readLines)
write(unlist(bibdata), file = "big.bib")

Your new file will be in the working directory of R.

    
09.07.2016 / 22:15