What are the disadvantages of using .Rdata files compared to HDF5 or netCDF?

前端 未结 4 1379
借酒劲吻你
借酒劲吻你 2020-12-24 12:45

I have been asked to change a software that currently exports .Rdata files so that it exports in a \'platform independent binary format\' such as HDF5 or netCDF. Two reasons

4条回答
  •  时光取名叫无心
    2020-12-24 13:04

    (Binary) file formats come in two basic flavors:

    • application-neutral, supported by public libraries and APIs (and both netCDF and HDF5 fall into this camp) which facilitates exchange of data among different programs and applications provided they are extended with add-on packages using the APIs

    • application-specific ones only designed to work with one program, albeit more efficiently: that is what .RData does

    Because R is open-source, you could re-create the format for RData from your Matlab files: Nothing stops you from writing a proper mex file that. Maybe someone has even done it already. There is no technical reason not to try---but the other route may be easier if both applications meant to share the data support the format equally well.

    For what it is worth, back in the early/mid-1990s, I did write my own C code to write simulation files in the binary format used by Octave (which I used then slice the data). Being able to do this with open source software is a big plus.

提交回复
热议问题