interval_commit_metric: Calculate Metric for Commit Interval

View source: R/interval.R

interval_commit_metricR Documentation

Calculate Metric for Commit Interval

Description

Calculates a metric using 'metric_function' for a list of commit intervals specified in 'dt_range'. All commit ranges must exist in 'project_git' in order to derive the original timestamps to subset the interval.

Usage

interval_commit_metric(
  project_git,
  dt_range,
  metric_function,
  file_extensions,
  substring_filepath,
  file_column_name
)

Arguments

project_git

a data.table where the key is commit+file

dt_range

a data.table which contains a column 'range' specifying the commit interval on the form 'commitsha1-commitsha2'

metric_function

A metric function from metric.R to apply to each interval

file_extensions

a character vector of extensions (e.g. c(py,java)) to *keep*

substring_filepath

a character vector of substrings (e.g. c(py,java)) we wish to *filter*

file_column_name

a string indicating the column name which contains filepaths

Value

a numeric vector of 'metric_function' values for each commit interval specified in 'dt_range'

See Also

metric_churn_per_commit_interval as an example of metric_function


sailuh/kaiaulu documentation built on Dec. 10, 2024, 3:14 a.m.