| readMatrix | R Documentation |
writeMatrixreadMatrix reads a matrix written by writeMatrix into a R session
readMatrix(file, row.names = TRUE, as.matrix = TRUE, ...)
file |
file to be read in |
row.names |
Logical, whether the first column contains row names (should be consistent with the setting in |
as.matrix |
Logical, whether the data.frame object should be cast into a matrix |
... |
Other parameters passed to |
Default behaviour of read.table is adapted to the convention used in writeMatrix
Matrix when as.matrix is set to TRUE and otherwise data.frame
test.mat <- matrix(rnorm(1000), nrow=10, dimnames=list(LETTERS[1:10], 1:100))
tmpfile <- tempfile()
writeMatrix(test.mat, tmpfile)
readin.mat <- readMatrix(tmpfile)
if(require(ribiosUtils)) identicalMatrix(test.mat, readin.mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.