Giter Site home page Giter Site logo

rmatio's People

Contributors

stewid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rmatio's Issues

NULL objects

Can we do something with NULL objects in nested lists during writing? Currently we get error("Unable to write list");

IMHO, it would be better not to have such situation but some R packages produce indeed dataframes with NULL objects deeply in nested list structures. My quick and dirty solution is recursive replacement of NULL objects in R with something readable by rmatio but would it be possible to do it automatically with additional parameter to write.mat() function?

Adding r-rmatio to conda-forge

Wonderful package, @stewid!!! ๐Ÿš€

Would be great if r-rmatio could be made available on the conda-forge channel. Many of us use this for software development and create reproducible workflows. I know r-rmatio's currently on the r channel but I'm having a lot of trouble building an image with it because of conflicts. Let me know what you think! Thank you!!!

3 is not a supported class

First of all, thank you for this great package. I was trying to read the attached file but I got this error:

Error in read.mat(file.path("D:", "_R_WD", "git_projects", "rat_wm_training", :
Read5: 3 is not a supported class

Is it a mat file version problem?

Many thanks
example.zip

Matlab import trouble

Hi,

Thank you for building this package.

I experienced an import error in 3/40 .mat files, with an error message of

InflateVarName: inflate returned buffer error

not sure what is wrong, when all .mat files appear to have the same structure.

Regards,
Bernard

Unexpected error

Hi,

Please find the files which are able to reproduce errors on following link:
http://www.mediafire.com/download/xllevn8yqn2jyoa/rmatio_error.rar

data.RData contains the data I want to save to .mat file. DT is my data.table which contains three different vdid, I want to save the data for each vdid. Therefore, I use test_script.r to do what I want.

But something wired happens, some files with compression get error when importing by read.mat and some not. If I save them without compression, they are all fine. I do not know what cause this difference.

I have tried:

  1. to check that the output list contains same type of data. ("numeric" checked by class and mode)
  2. to use Matlab R2015b to read these mat files, it get error on the same files.
  3. to delete .mat files when R is opening, those files which get error when importing can not be deleted. (It is using by some program.) -> I guess that the file had not been closed as expected, so it cannot be imported.

My session information:
`
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rmatio_0.11.0 lattice_0.20-33 Matrix_1.2-2 magrittr_1.5 purrr_0.2.0
[6] tidyr_0.2.0 dplyr_0.4.3 plyr_1.8.3 data.table_1.9.4 RevoUtilsMath_3.2.2

loaded via a namespace (and not attached):
[1] Rcpp_0.12.0 assertthat_0.1 grid_3.2.2 chron_2.3-47 R6_2.1.1 DBI_0.3.1 stringi_0.5-5
[8] reshape2_1.4.1 tools_3.2.2 stringr_1.0.0 parallel_3.2.2
`

rmatio library is slower than R.matlab for importing

Hello,

I would like to report a speed difference between rmatio and R.matlab libraries. The rio package uses rmatio so it would be nice if the time to read a MATLAB matrice could be reduced:

> system.time(x <- R.matlab::readMat("http://ufldl.stanford.edu/housenumbers/test_32x32.mat"))
Registered S3 method overwritten by 'R.oo':
  method        from       
  throw.default R.methodsS3
   user  system elapsed 
   7.65    2.25   27.08 
> system.time(x <- rmatio::read.mat("http://ufldl.stanford.edu/housenumbers/test_32x32.mat"))
   user  system elapsed 
  34.54  109.36  161.91 
> system.time(x <- rio::import("http://ufldl.stanford.edu/housenumbers/test_32x32.mat"))
   user  system elapsed 
  97.75  131.48  308.01

Unable to open file

When trying to open a .mat (v7) file (for example, https://gofile.io/?c=GJxhm0), the following error is returned.

Error in read.mat("~/Downloads/a.mat") : Unable to open file.

Matlab: R2017b

โ”€ Session info โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 setting  value                       
 version  R version 3.6.2 (2019-12-12)
 os       macOS Catalina 10.15.3      
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Europe/Berlin               
 date     2020-03-03                  

โ”€ Packages โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.6.0)
 backports     1.1.5   2019-10-02 [1] CRAN (R 3.6.0)
 blogdown      0.17    2019-11-13 [1] CRAN (R 3.6.0)
 bookdown      0.17    2020-01-11 [1] CRAN (R 3.6.0)
 callr         3.4.2   2020-02-12 [1] CRAN (R 3.6.0)
 cli           2.0.2   2020-02-28 [1] CRAN (R 3.6.0)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.6.0)
 desc          1.2.0   2018-05-01 [1] CRAN (R 3.6.0)
 devtools      2.2.2   2020-02-17 [1] CRAN (R 3.6.0)
 digest        0.6.25  2020-02-23 [1] CRAN (R 3.6.2)
 ellipsis      0.3.0   2019-09-20 [1] CRAN (R 3.6.0)
 evaluate      0.14    2019-05-28 [1] CRAN (R 3.6.0)
 fansi         0.4.1   2020-01-08 [1] CRAN (R 3.6.0)
 fortunes      1.5-4   2016-12-29 [1] CRAN (R 3.6.0)
 fs            1.3.1   2019-05-06 [1] CRAN (R 3.6.0)
 glue          1.3.1   2019-03-12 [1] CRAN (R 3.6.0)
 htmltools     0.4.0   2019-10-04 [1] CRAN (R 3.6.0)
 knitr         1.28    2020-02-06 [1] CRAN (R 3.6.2)
 lattice       0.20-40 2020-02-19 [1] CRAN (R 3.6.0)
 magrittr      1.5     2014-11-22 [1] CRAN (R 3.6.0)
 Matrix        1.2-18  2019-11-27 [1] CRAN (R 3.6.2)
 memoise       1.1.0   2017-04-21 [1] CRAN (R 3.6.0)
 packrat       0.5.0   2018-11-14 [1] CRAN (R 3.6.0)
 pkgbuild      1.0.6   2019-10-09 [1] CRAN (R 3.6.0)
 pkgload       1.0.2   2018-10-29 [1] CRAN (R 3.6.0)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 3.6.0)
 processx      3.4.2   2020-02-09 [1] CRAN (R 3.6.2)
 ps            1.3.2   2020-02-13 [1] CRAN (R 3.6.0)
 R6            2.4.1   2019-11-12 [1] CRAN (R 3.6.0)
 Rcpp          1.0.3   2019-11-08 [1] CRAN (R 3.6.0)
 remotes       2.1.1   2020-02-15 [1] CRAN (R 3.6.0)
 rlang         0.4.5   2020-03-01 [1] CRAN (R 3.6.0)
 rmarkdown     2.1     2020-01-20 [1] CRAN (R 3.6.0)
 rmatio      * 0.14.0  2019-03-18 [1] CRAN (R 3.6.0)
 rprojroot     1.3-2   2018-01-03 [1] CRAN (R 3.6.0)
 rstudioapi    0.11    2020-02-07 [1] CRAN (R 3.6.0)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.0)
 testthat      2.3.2   2020-03-02 [1] CRAN (R 3.6.2)
 usethis       1.5.1   2019-07-04 [1] CRAN (R 3.6.0)
 withr         2.1.2   2018-03-15 [1] CRAN (R 3.6.0)
 xfun          0.12    2020-01-13 [1] CRAN (R 3.6.0)
 yaml          2.2.1   2020-02-01 [1] CRAN (R 3.6.0)

Nested Matlab file is not properly decoded

When I open the attached file, I loose most of the data and the nesting of participants in the data does not work (only the first participant's data is shown and everybody elses data is droped. It opens with R.matlab but it doesn't have the labels which rmatio preserves. It would be great if there was a way to extract the data.

DATA.zip

rmatio doen't save 1x1 matrix in a list

Hello,

The following examples show that "a$bias$z" is not correctly saved in .mat:
a = list()
a$bias$x = matrix(1:4,2,2)
a$bias$y = rep(1,2)
a$bias$z = matrix(1,1,1)
write.mat(a, paste("a",".mat", sep = ""))

I would appreciate very much if this bug could be fixed.

Many thanks for this package!

Problem with matlab file

I have a Matlab generated file that causes a problem: Error message is

read.mat("OneOnly.mat")
Error in read.mat("OneOnly.mat") :
InflateDimensions: Reading dimensions expected type MAT_T_INT32

I assume it has to do with class type 17 in the Timer field not recognized; R.matlab also fails, but Python and Matlab can read the file without problems. However, pure C-matio can read it (not tested myself)

Here is the download link:
http://menne-biomed.de/uni/matioProblem.zip

R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] R.matlab_2.2.3  rmatio_0.9.0    lattice_0.20-29 Matrix_1.1-3    testthat_0.8.1 

Matlab 7.3 support

There seems to be a semi working mat73 branch which has issues loading a mat 7.3 file I have. Is this project still alive?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.