Skip to contents

Puts the columns of a table of the history in their order and gives them their types. A column that df lacks is added as NA, and a column that the table does not have is dropped.

Usage

set_types(df, name)

Arguments

df

A data frame.

name

The name of a table of the history, such as "repos" or "views".

Value

The data frame, with the columns of the table and without row names.

Examples

rghcard:::set_types(data.frame(date = "2026-12-01", repo = "rwf", count = "45"), "views")
#>   repo       date count uniques
#> 1  rwf 2026-12-01    45      NA