Thanks Tim for responding. I tried with `JLD.jldopen` instead. Now all the
columns are saved including boolean without conversion to integer, as
expected. However R session consistently crashes when trying to even look
at the file structure with `rhdf5::h5ls("trydf.h5")`. Not sure if this is
rhdf5 R-package issue or not, but something goes wrong when JLD annotations
are present.
On a more conceptual level, are R and Julia DataFrame structures too
different to manage read/write without reassembling from separate columns?
On Thursday, January 22, 2015 at 3:25:06 PM UTC-8, Tim Holy wrote:
>
> In your code, could you basically replace `h5open` with `jldopen`? That
> way
> when you try reading the same file again with julia, you'll have all the
> type
> information.
>
> JLD is basically "HDF5 with annotations that JLD knows how to interpret."
> If
> you're reading the file from another language, you don't have to pay
> attention
> to the annotations (unless you want to).
>
> --Tim
>
> On Thursday, January 22, 2015 11:09:25 AM Pavel wrote:
> > While reading R datasets in Julia received sufficient attention already,
> > sometimes the results of computations done in Julia need to be readable
> to
> > R. To accomplish that I was trying to save a DataFrame.jl
> > <https://github.com/JuliaStats/DataFrames.jl> object in HDF5 file. The
> code
> > so far is in my StackOverflow question (probably should have posted here
> > instead):
> >
> http://stackoverflow.com/questions/28084403/saving-julia-dataframe-to-read-i
> > n-r-using-hdf5
> >
> > The dataframe can then be reassembled in R using rhdf5
> > <http://www.bioconductor.org/packages/release/bioc/html/rhdf5.html>
> package
> > tools. It works in principle, but is there a more elegant way to
> accomplish
> > this? Something that does not require to split the dataframe apart and
> > re-assemble in R, losing some column types (e.g. boolean does not work)
> > along the way?
>
>