Description Usage Arguments Details Value Note See Also Examples
Reads the values in a mat-file to a list.
1 | read.mat(filename)
|
filename |
Character string, with the MAT file or URL to read. |
Reads the values in a mat-file and stores them in a list.
A list with the variables read.
A sparse complex matrix is read as a dense complex matrix.
A sparse logical matrix is read as a 'lgCMatrix'
A sparse matrix is read as a 'dgCMatrix'
A matrix of dimension 1 x n
or n x 1
is read as a vector
A structure is read as a named list with fields.
A cell array is read as an unnamed list with cell data
A function class type is read as NULL and gives a warning.
See write.mat
for more details and examples.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
library(rmatio)
## Read a version 4 MAT file with little-endian byte ordering
filename <- system.file('extdata/matio_test_cases_v4_le.mat', package='rmatio')
m <- read.mat(filename)
## View content
str(m)
## Read a version 4 MAT file with big-endian byte ordering.
filename <- system.file('extdata/matio_test_cases_v4_be.mat', package='rmatio')
m <- read.mat(filename)
## View content
str(m)
## Read a compressed version 5 MAT file
filename <- system.file('extdata/matio_test_cases_compressed_le.mat', package='rmatio')
m <- read.mat(filename)
## View content
str(m)
## Read a compressed version 5 MAT file
url <- paste("http://sourceforge.net/p/matio/matio_test_datasets/ci/",
"master/tree/matio_test_cases_compressed_le.mat?format=raw",
sep="")
m <- read.mat(url)
## View content
str(m)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.