Skip to content

Commit

Permalink
Update lifecycle.Rmd (#1038)
Browse files Browse the repository at this point in the history
* Update lifecycle.Rmd

* Update lifecycle.Rmd

Co-authored-by: Jennifer (Jenny) Bryan <[email protected]>

* Update lifecycle.Rmd

Remove footnote

---------

Co-authored-by: Jennifer (Jenny) Bryan <[email protected]>
  • Loading branch information
MikeJohnPage and jennybc authored Dec 14, 2023
1 parent cf2e94d commit 36ec45e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lifecycle.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ These three different views of usethis's evolution are all useful for different

Formally, an R package version is a sequence of at least two integers separated by either `.` or `-`.
For example, `1.0` and `0.9.1-10` are valid versions, but `1` and `1.0-devel` are not.
Base R offers the `utils::package_version()`[^lifecycle-2] function to parse a package version string into a proper S3 class by the same name.
Base R offers the `package_version()` function to parse a package version string into a proper S3 class by the same name.
This class makes it easier to do things like compare versions.

[^lifecycle-2]: We can call `package_version()` directly here, but in package code, you should use the `utils::package_version()` form and list the utils package in `Imports`.

```{r}
#| error: true
package_version(c("1.0", "0.9.1-10"))
Expand Down

0 comments on commit 36ec45e

Please sign in to comment.