Search notes:

R function: sort

v <- c (5, 3, 6, 1, NA, 2, 7, 4 )

sort(v)
# [1] 1 2 3 4 5 6 7

sort(v, decreasing=TRUE)
# [1] 7 6 5 4 3 2 1

sort(v, na.last=TRUE)
# [1]  1  2  3  4  5  6  7 NA

sort(v, na.last=FALSE)
# [1] NA  1  2  3  4  5  6  7

sort(v, na.last=NA)
# [1] 1 2 3 4 5 6 7

is.unsorted(v)
# [1] NA

w<-sort(v)
is.unsorted(w)
# [1] FALSE
Github repository about-r, path: /functions/sort.R

See also

Index to (some) R functions
Perl function: sort, Shell command: sort, vim script: sort

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758190186, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/sort(63): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78