View source: R/pre_release_ids.R
new_pre_release_ids | R Documentation |
Create a vector of pre-release identifiers, which can be used for marking versions as pre-release versions.
pre_release_ids()
is a low-level constructor for creating
pre-release identifiers from individual components.
parse_pre_release_ids()
parses a character vector into
pre-release identifiers.
Empty identifiers are special cases that indicate not a pre-release version.
new_pre_release_ids(id1 = character(), id2 = "", id3 = "", id4 = "", id5 = "")
parse_pre_release_ids(x)
id1 , id2 , id3 , id4 , id5 |
Single pre-release identifiers.
Each identifier can be something to be cast to a pre_release_identifier
vector by |
x |
A character vector representing pre-release identifiers.
Each identifier separated by a dot ( |
Internally, pre_release_ids store up to 5 pre_release_identifier.
So this can't represent pre-release identifiers with more than 5 components.
If passing character containing more than 5 components to
parse_pre_release_ids()
, it will throw an error.
A pre_release_ids vector.
# Each components are concatenated with a dot
new_pre_release_ids("rc", 1:3)
ids <- parse_pre_release_ids(
c("", "alpha.beta", "alpha.1", "beta", "beta.11", "beta.2")
)
ids
# Empty ids have the highest precedence
# (Used to indicate not a pre-release version)
vctrs::vec_sort(ids)
# Works with base R vectors.
ids[ids > "beta.2"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.