Description Usage Arguments Details Value Author(s) Examples
.. content for (no empty lines) ..
1 | order_matrix(m, cols = 1L:ncol(m), rows = 1L:nrow(m))
|
m |
Matrix |
cols |
Positions or names of the columns to order. |
rows |
Integer vector with the rows to order. |
.. content for ..
An integer vector with the order of the selected rows.
emilio
1 2 3 4 5 6 7 8 9 10 11 12 | m <- data.matrix(iris[,1:4])
m[2,1] <- NA
oom <- order_matrix(m,c("Sepal.Length","Sepal.Width"))
head(m[oom,])
rows <- 1:10
oom <- order_matrix(m,c("Sepal.Length","Sepal.Width"),rows)
m[rows,][oo,]
oom <- order_matrix(m,c("Sepal.Length","Sepal.Width"))
oo <- order(m[,"Sepal.Length"],m[,"Sepal.Width"],na.last=FALSE)
all.equal(oom,oo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.