| Title: | Ordering authorships for R packages hosted on GitHub |
|---|---|
| Description: | Easily obtain and order GitHub user contributions, which helps with ordering authorships for R packages. |
| Authors: | Rémi Thériault [aut, cre] (ORCID: <https://orcid.org/0000-0003-4315-6788>, Twitter: @rempsyc) |
| Maintainer: | Rémi Thériault <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-05-27 09:51:37 UTC |
| Source: | https://github.com/rempsyc/githubContributors |
Get GitHub contributions, which can then be ordered with order_authors().
get_contributions(repo, user = "easystats")get_contributions(repo, user = "easystats")
repo |
A character vector of one or more repository names. When multiple
repositories are provided (e.g., |
user |
username |
When a single repository is provided, a data frame with username of contributor, number of added lines of code, deleted lines of code, and number of commits. When multiple repositories are provided, a named list of data frames, one for each repository.
https://stackoverflow.com/a/75277425/9370662
head(get_contributions("report"))head(get_contributions("report"))
Order GitHub authors based on contributions (obtained from get_contributions()).
order_authors(data, commit.weight = 0, cutoff = 1000)order_authors(data, commit.weight = 0, cutoff = 1000)
data |
A data frame or a named list of data frames (as returned by
|
commit.weight |
A multiplication constant representing the weight the number of commits should have (setting it to 0, the default, will make it have no impact). |
cutoff |
Cutoff score under which to exclude contributors from the filtered list. |
When a single data frame is provided, a data frame with username of contributor, number of added lines of code, deleted lines of code, number of commits, and a total 'score' column representing the sum of the other columns. When a list of data frames is provided, a named list of data frames with the same structure.
x <- get_contributions("report") order_authors(x)x <- get_contributions("report") order_authors(x)