powered by
Sort a lvec
# S3 method for lvec sort(x, decreasing = FALSE, clone = TRUE, ...)
Sorts x and returns a sorted copy of x. When clone is FALSE the input vector is modified.
x
clone
FALSE
lvec to sort
unused (a value unequal to FALSE will generate an error).
clone x before sorting
unused.
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