Readmat requires a full license and installation of Matlab(R)
if you don’t have this then the R.matlab
(Bengtsson 2018) package is
much more suitable. The only goal of this package is to provide a
potentially faster approach, especially when dealing with large
matrices.
This package is definitely under development!
A data cube of 400 x 400 x 400 values.
readmat::read_mat(readmat::get_matlab("double-large-cube.mat"))[[1]] |>
dim()
#> 1 object(s) found in this MAT file.
#> Object has 3 dimensions of size: 400, 400, 400, with type: double.
#> [1] 400 400 400
Comparing R.matlab
and readmat
.
| package | min | median | itr/sec | mem_alloc | n_itr | n_gc | total_time | |:---------|-----:|-------:|--------:|----------:|------:|-----:|-----------:| | R.matlab | 3.31 | 3.36 | 1.00 | 3.98 | 10 | 0 | 27.775926 | | readmat | 1.00 | 1.00 | 3.33 | 1.00 | 5 | 5 | 4.173084 |
You can install the development version of readmat from GitHub with:
# install.packages("devtools")
devtools::install_github("MartinSchobben/readmat")
The construction of the R (R Core Team 2022) package readmat
and
associated documentation was aided by the packages; devtools
(Wickham
et al. 2021) and cpp11
(Hester and François 2021).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.