knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Travis build status

newsriver

R wrapper to the newsriver.io, an API to obtain news articles.

Installation

# install.packages("remotes")
remotes::install_github("news-r/newsriver")

Setup

First, create an account to obtain an API key. Then either specify the aforementioned key using newsriver_key or specify it as environment variable (likely in your .Renviron) as NEWSRIVER_API_KEY.

library(newsriver)
newsriver_key("xXxxX")

Example

library(newsriver)

news <- nr_search('language:en AND text("Trump")')
news[[1]]


news-r/newsriver documentation built on June 10, 2019, 12:27 a.m.