This function expands the parts of a vector of version numbers into a data.frame which may be useful, e.g. for moving version numbers to a database.

tabulate_versions(x, full_version = c("none", "version_number", "character"))

Arguments

x

The version numbers to tabulate

full_version

Control how a column is added that contains the full version numbers. Either "version_number" for a version_number-class column, "character" for a character-class column or "none" to not add a column.

Value

A data.frame

Examples

tabulate_versions(version_number("1.0.0.0", "1.0.1.0"))
#> # A tibble: 2 x 4 #> major minor patch dev #> <int> <int> <int> <int> #> 1 1 0 0 0 #> 2 1 0 1 0
tabulate_versions(version_number("1.0.0.0", "1.0.1.0"), "version_number")
#> # A tibble: 2 x 5 #> full_version major minor patch dev #> <vrsn> <int> <int> <int> <int> #> 1 [4] 1 0 0 0 #> 2 [4] 1 0 1 0