sort.lvec: Sort a lvec

Description Usage Arguments Value Examples

View source: R/sort.R

Description

Sort a lvec

Usage

1
2
## S3 method for class 'lvec'
sort(x, decreasing = FALSE, clone = TRUE, ...)

Arguments

x

lvec to sort

decreasing

unused (a value unequal to FALSE will generate an error).

clone

clone x before sorting

...

unused.

Value

Sorts x and returns a sorted copy of x. When clone is FALSE the input vector is modified.

Examples

1
2
3
4
5
6
7
x <- as_lvec(rnorm(10))
sort(x)

# Effect of clone
a <- as_lvec(rnorm(10))
b <- sort(a, clone = FALSE)
print(a)

djvanderlaan/lvec documentation built on Aug. 16, 2018, 11:02 a.m.