gather_commits: Get rOpenSci commits

Description Usage Arguments Value Examples

View source: R/gathercommits.R

Description

Get rOpenSci commits

Usage

1
gather_commits(x, file = Sys.Date(), token = NULL)

Arguments

x

One or more R packages, of the form ropensci/rfishbase, case sensitive

file

A date, or other character string to make the file ending unique. Default: Sys.Date()

token

A GitHub Personal Access Token (PAT). If not given, we look in your env vars for GITHUB_PAT

Value

writes a data.frame to rappdirs::user_cache_dir("rostats"), prints message of path to file, and returns file path itself

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
library("dplyr")
library("ropkgs")
library("rostats")
pkgs <- ropensci_pkgs()


library("dplyr")
url <- "https://raw.githubusercontent.com/ropensci/roregistry/gh-pages/registry.json"
df <- jsonlite::fromJSON(url)
(pkgs <- tbl_df(df$packages) %>%
  # filter(on_cran, !cran_archived) %>%
  # filter(name != "pleiades") %>%
  .$url %>%
  gsub('https://github.com/', '', .)
)

pkgs[3] <- "GuangchuangYu/treeio"

z <- gather_commits(x = pkgs)
# gather_commits(x = pkgs$owner_repo)

## End(Not run)

ropensci/rostats documentation built on Oct. 15, 2019, 1:37 p.m.