Description Usage Arguments Value Examples
Set the version field. "Major", "minor" and "patch" fields are set as integers, "prerelease" and "build" are set with character strings.
1 2 3 4 5 6 7 8 | set_version(x, field, value, ...)
## S3 method for class 'svptr'
set_version(x, field = c("major", "minor", "patch",
"prerelease", "build"), value, ...)
## S3 method for class 'svlist'
set_version(x, field, value, ...)
|
x |
An object of class "svlist" or "svptr". |
field |
For the "svptr" class a character string detailing the field to set (major, minor etc...). For the "svlist" class a character vector detailing the field to set for each list member. |
value |
The value to set the field to. For fields "major", "minor" and "patch" this is an integer. For fields "prerelease" and "build" this is a character. For the "svptr" class value is a scalar. For the "svlist" class value is a list detailing the value to set for each list member. |
... |
Additional arguments passed on to methods. |
returns an object of class svptr or svlist
1 2 3 4 | semver <- parse_version(c("1.2.3", "1.2.4-alpha+bld1"))
semver[[1]] <- set_version(semver[[1]], "major", 2L)
set_version(semver, c("prerelease", "build"), list("hello"))
set_version(semver, c("prerelease"), list("hello", "world"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.