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] (<https://orcid.org/0000-0003-4315-6788>, @rempsyc) |
Maintainer: | Rémi Thériault <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-09-10 03:08:32 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 |
repository |
user |
username |
A data frame with username of contributor, number of added lines of code, deleted lines of code, and number of commits.
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 |
data |
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. |
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.
x <- get_contributions("report") order_authors(x)
x <- get_contributions("report") order_authors(x)