sortRows | R Documentation |
sortRows
sortRows(
x,
z = FALSE,
toporder = NULL,
na.rm = FALSE,
method = "MDS_angle",
toporder.meth = "before"
)
x |
A numeric matrix or data.frame. |
z |
Whether to scale rows for the purpose of calculating order. |
toporder |
Optional verctor of categories (length=nrow(x)) on which to supra-order when sorting rows. |
na.rm |
Whether to remove missing values and invariant rows. |
method |
Seriation method; 'MDS_angle' (default) or 'R2E' recommended. |
toporder.meth |
Whether to perform higher-order sorting 'before' (default) or 'after' the lower-order sorting. |
A reordered matrix or data.frame.
# random data
m <- matrix( round(rnorm(100,mean=10, sd=2)), nrow=10,
dimnames=list(LETTERS[1:10], letters[11:20]) )
m
sortRows(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.