powered by
A method for the generic function sort which allows numeric objects of class english to be sorted.
sort
english
# S3 method for english sort(x, decreasing = FALSE, ...)
An object of class english.
logical: should the object be sorted in decreasing order?
Not currently used.
An object of class english with its components in numerically sorted order.
The method temporarily removes the english class, sorts the object components and reinstates the english class to the result.
See original note by John Fox in the Programmers Niche section of https://cran.r-project.org/doc/Rnews/Rnews_2005-1.pdf.
english.
# NOT RUN { set.seed(1010) x <- english(sample(1:100, 5)) noquote(matrix(as.character(x))) noquote(matrix(as.character(sort(x)))) # }
Run the code above in your browser using DataLab