Tabularize chunks output

pub_tabularize(x, bind = FALSE)

Arguments

x

the output of pub_chunks()

bind

(logical) whether to bind list of data.frames or not. ignored unless list input to x. default: FALSE

Value

a data.frame or list

Examples

if (FALSE) { # one at a time ## example 1, a file path x <- system.file("examples/elife_1.xml", package = "pubchunks") (res <- pub_chunks(x, c("doi", "title", "keywords"))) pub_tabularize(res) ## example 2, a file path y <- system.file("examples/frontiers_1.xml", package = "pubchunks") (res2 <- pub_chunks(y, c("doi", "title", "keywords"))) pub_tabularize(res2) # > 1, a list of file paths x <- system.file("examples/elife_1.xml", package = "pubchunks") y <- system.file("examples/frontiers_1.xml", package = "pubchunks") (res <- pub_chunks(list(x, y), c("doi", "title", "keywords"))) pub_tabularize(res) pub_tabularize(res, bind = TRUE) # using output of fulltext::ft_get() if (requireNamespace("fulltext", quietly = TRUE)) { dois <- c('10.1371/journal.pone.0086169', '10.1371/journal.pone.0155491', '10.7554/eLife.03032') x <- fulltext::ft_get(dois) (tmp <- pub_chunks(fulltext::ft_collect(x), sections=c("doi","title"))) pub_tabularize(tmp) pub_tabularize(tmp, bind = TRUE) }}