Learn R Programming

pkgmaker (version 0.10.1)

orderVersion: Ordering Version Numbers

Description

Orders a vector of version numbers, in natural order.

Usage

orderVersion(x, decreasing = FALSE)

sortVersion(x, ...)

Arguments

x
a character vector of version numbers
decreasing
a logical that indicates if the ordering should be decreasing
...
extra parameters passed to orderVersion

Examples

Run this code
v <- c('1.0', '1.03', '1.2')
order(v)
orderVersion(v)
sort(v)
sortVersion(v)

Run the code above in your browser using DataLab