View source: R/pre_release_identifier.R
new_pre_release_identifier | R Documentation |
A class representing a single pre-release identifier (alphanumeric or numeric) for Semantic Versioning 2.0.0.
new_pre_release_identifier(x = character())
x |
Something that can be coerced to a character vector by
|
A pre_release_identifier vector.
pre_release_ids: Whole pre-release identifiers (Concatenation of pre_release_identifier).
ids <- new_pre_release_identifier(
c("1", "2", "10", "01", "alpha", "beta", "", NA)
)
ids
# Numeric identifiers are always sorted before alphanumeric ones.
vctrs::vec_sort(ids)
# Works with base R vectors.
ids[ids == "alpha" & !is.na(ids)]
ids[ids > 2L & !is.na(ids)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.