Description Usage Arguments Examples
Sort a Spectra
object with respect to its rows with respect to values of one
given column (specified by which.col). Sorting with respect to multiple columns is not implemented yet.
1 2 |
x |
A |
decreasing |
Logical. If TRUE, then the rows are sorted in decreasing order. Passed on to the sort.idx() function from the base package. Default is FALSE. |
na.last |
for controlling the treatment of NAs. Passed on to the sort.idx() function from the base package. Default is NA. |
which.col |
A character, defining the name of the column to be used in the sorting |
... |
arguments to be passed to or from methods. See help of |
1 2 3 4 5 | sp <- spc.example_spectra()
sp2 <- sort(sp, which.col="Offset")
sp2$Offset
sp2 <- sort(sp, which.col="CAST", decreasing=TRUE)
sp2$CAST
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.