Learn R Programming

lvec (version 0.2.5)

sort.lvec: Sort a lvec

Description

Sort a lvec

Usage

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

Value

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

Arguments

x

lvec to sort

decreasing

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

clone

clone x before sorting

...

unused.

Examples

Run this code
x <- as_lvec(rnorm(10))
sort(x)

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

Run the code above in your browser using DataLab