Description Usage Arguments Value Examples
View source: R/matrix2dataframe.R
Converts a numeric matrix to a data frame with decreasing or increasing values: First column row index, second column col index and third column the value. If the matrix is symmetric, only the upper triangle is taken into account.
1 2 3 4 5 6 7 | matrix2dataframe(
m,
decreasing = TRUE,
tol = 100 * .Machine$double.eps,
tol1 = 8 * tol,
...
)
|
m |
numeric: a matrix of values |
decreasing |
logical: should the sort order be increasing or decreasing (default: |
tol |
numeric scalar >= 0. Smaller differences are not
considered, see |
tol1 |
numeric scalar >= 0. |
... |
further arguments passed to methods; the matrix method
passes these to |
a data frame with an attribute matrix
with m
1 2 3 | # non-symmetric
x <- matrix(runif(9), ncol=3)
matrix2dataframe(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.