Skip to contents

Gives the tables of the history the class rghcard_stats and the attributes that the cards read.

Usage

new_stats(stats, user, updated, joined = as.Date(NA))

Arguments

stats

A list of the tables of the history.

user

The GitHub user name.

updated

The day of the last collection.

joined

The day the user joined GitHub, NA when unknown.

Value

An rghcard_stats object.

Examples

names <- c("repos", "views", "clones", "releases", "actions", "contributions", "commits")
tables <- stats::setNames(lapply(names, rghcard:::empty_table), names)
rghcard:::new_stats(tables, "example-user", as.Date("2026-12-03"))
#> GitHub statistics of example-user, collected until 2026-12-03
#> 0 repositories, 0 stars
#> Tables: repos (0 rows), views (0 rows), clones (0 rows), releases (0 rows), actions (0 rows), contributions (0 rows), commits (0 rows)