read.mat {rmatio}R Documentation

Read Matlab file

Description

Reads the values in a mat-file to a list.

Usage

read.mat(filename)

Arguments

filename

Character string, with the MAT file or URL to read.

Details

Reads the values in a mat-file and stores them in a list.

Value

A list with the variables read.

Note

See Also

See write.mat for more details and examples.

Examples

## 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)

[Package rmatio version 0.19.0 Index]