Learn R Programming

GitStats (version 2.3.3)

get_issues_stats: Get issues statistics

Description

Prepare statistics from the pulled issues data.

Usage

get_issues_stats(
  issues,
  time_aggregation = c("year", "month", "week", "day"),
  group_var
)

Value

A table of issues_stats class.

Arguments

issues

A gitstats_issue S3 class table object (output of get_issues()).

time_aggregation

A character, specifying time aggregation of statistics.

group_var

Other grouping variable to be passed to dplyr::group_by() function apart from stats_date and githost. Could be: author, state or organization. Should be passed without quotation marks.

Details

To make function work, you need first to get issues data with GitStats. See examples section.

Examples

Run this code
if (FALSE) {
 my_gitstats <- create_gitstats() %>%
   set_github_host(
     token = Sys.getenv("GITHUB_PAT"),
     repos = c("r-world-devs/GitStats", "openpharma/visR")
   ) |>
   get_issues(my_gitstats, since = "2022-01-01") |>
   get_issues_stats(
     time_aggregation = "month",
     group_var = state
   )
}

Run the code above in your browser using DataLab