file <- "https://raw.githubusercontent.com/jmbarbone/bib-references/master/references.bib"
bibdf <- read_bib(file, max_lines = 51L)
if (package_available("tibble")) {
tibble::as_tibble(bibdf)
} else {
head(bibdf)
}
if (package_available("bib2df") & package_available("bench")) {
file <- system.file("extdata", "bib2df_testfile_3.bib", package = "bib2df")
# Doesn't include the 'tidying' up
foo <- function(file) {
bib <- ("bib2df" %colons% "bib2df_read")(file)
("bib2df" %colons% "bib2df_gather")(bib)
}
# \donttest{
bench::mark(
read_bib = read_bib(file),
bib2df = bib2df::bib2df(file),
foo = foo(file),
check = FALSE
)[1:9]
# }
}
Run the code above in your browser using DataLab