Learn R Programming

risk.assessr (version 3.0.1)

count_commits_last_months: Count Commits in the Last Months

Description

Counts the total number of commits from the last `months` months using a data frame with weekly commit data (column `week_start`).

Usage

count_commits_last_months(df, months = 1, today = Sys.Date())

Value

Integer. Total number of commits in the time window.

Arguments

df

A data frame with `week_start` (Date) and `n_commits` (int) columns.

months

Integer. Number of months to look back (default is 1).

today

today's date.default is Sys.Date()

Examples

Run this code
if (FALSE) {
df <- get_commits_since("tidyverse", "ggplot2", years = 1)
count_commits_last_months(df, months = 3)
}

Run the code above in your browser using DataLab