id <- new_pre_release_identifier(
c("1", "2", "10", "01", "-1", "alpha", "beta", "", NA)
)
id
# empty < numeric < alphanumeric
vctrs::vec_sort(id)
# Works with base R vectors.
id[id == "alpha" & !is.na(id)]
id[id > 2L & !is.na(id)]
Run the code above in your browser using DataLab