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.
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.
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.