orderVersion: Ordering Version Numbers

Description Usage Arguments Examples

View source: R/utils.R

Description

Orders a vector of version numbers, in natural order.

Usage

1
2
3
  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 and order

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#----------
# orderVersion
#----------
v <- c('1.0', '1.03', '1.2')
order(v)
orderVersion(v)

#----------
# sortVersion
#----------
sort(v)
sortVersion(v)

pkgmaker documentation built on May 2, 2019, 4:42 p.m.