Description Usage Arguments Value Examples
Tabularize chunks output
1 | pub_tabularize(x, bind = FALSE)
|
x |
the output of |
bind |
(logical) whether to bind list of data.frames or not.
ignored unless |
a data.frame or list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
# 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)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.