library("knitr") hook_output <- knitr::knit_hooks$get("output") knitr::knit_hooks$set(output = function(x, options) { lines <- options$output.lines if (is.null(lines)) { return(hook_output(x, options)) # pass to default hook } x <- unlist(strsplit(x, "\n")) more <- "..." if (length(lines)==1) { # first n lines if (length(x) > lines) { # truncate the output, but add .... x <- c(head(x, lines), more) } } else { x <- c(if (abs(lines[1])>1) more else NULL, x[lines], if (length(x)>lines[abs(length(lines))]) more else NULL ) } # paste these lines together x <- paste(c(x, ""), collapse = "\n") hook_output(x, options) }) knitr::opts_chunk$set( comment = "#>", collapse = TRUE, warning = FALSE, message = FALSE )
CORE API R client
CORE API docs: https://core.ac.uk/docs/
rcoreoa docs: https://docs.ropensci.org/rcoreoa/
Get an API key at https://core.ac.uk/api-keys/register. You'll need one,
so do this now if you haven't yet. Once you have the key, you can pass it
into the key
parameter, or as a much better option store your key as an
environment variable with the name CORE_KEY
or an R option as core_key
.
See ?Startup
for how to work with env vars and R options
CORE's tagline is: "Aggregating the world's open access research papers"
CORE offers seamless access to millions of open access research papers, enrich the collected data for text-mining and provide unique services to the research community.
For more infos on CORE, see https://core.ac.uk/about
install.packages("rcoreoa")
Development version
remotes::install_github("ropensci/rcoreoa")
library("rcoreoa")
Get started with an introduction to the package: https://docs.ropensci.org/rcoreoa/articles/rcoreoa
rcoreoa
in R doing citation(package = 'rcoreoa')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.