This function collates all data for a local R package or repository needed to create a dashboard with the repometrics_dashboard function. It combines data from both the repometrics_data_repo and repometrics_data_user functions.
Usage
repometrics_data(
path,
step_days = 1L,
num_cores = -1L,
ended_at = Sys.time(),
nyears = 1
)
Arguments
- path
Path to local repository containing an R package.
- step_days
Analyse package at intervals of this number of days. The last commit for each day is chosen. For example,
step_days = 7L
will return weekly statistics. Values of zero or less will analyse all commits, including potentially multiple daily commits.- num_cores
Number of cores to use in multi-core processing. Has no effect on Windows operating systems, on which calculations are always single-core only. Negative values are subtracted from number of available cores, determined as
parallel::detectCores()
, so default ofnum_cores = -1L
usesdetectCores() - 1L
. Positive values use precisely that number, restricted to maximum available cores, and a value of zero will use all available cores.- ended_at
Parameter used in some aspects of resultant data to limit the end date of data collection. Defaults to
Sys.time()
.- nyears
Parameter <= 1 determining fraction of a year over which data up until
end_date
are collected.
Value
A list of three forms of data:
"pkgstats" containing statistics on the historical development of package code, derived from the pkgstats package;
"rm" containing data from GitHub on the repository, including data on contributors, issues, pull requests, and people watching and starring the repository.
"contributors" as a named list of data on every individual contributor to the repository, whether by code contributions or GitHub issues or discussions.
See also
Other data:
repo_pkgstats_history()
,
repometrics_data_repo()
,
repometrics_data_user()