4

I googled but couldn't find any functions in Julia that can read and write R's RData (RDa) files. Is there any library / function / package that can allow me to do this? There appears to be a RDA.jl file in the src directory of DataFrames but I didn't find any mention of this in the DataFrames documentation.

uday
  • 6,453
  • 13
  • 56
  • 94

1 Answers1

2

The function you are looking for is read_rda which comes with the DataFrames package. So,

read_rda(filename)

should work and return a Dict with variable names => data.

meggart
  • 435
  • 3
  • 6
  • 2
    is there any function that can write a rda file (e.g. write_rda)? – uday Feb 19 '14 at 13:52
  • 2
    I recommend passing in the keyword parameter **convertdataframes** as well to automatically convert things to julia DataFrames objects: `read_rda("some_data_file.dat",convertdataframes=true)` – Will Townes Feb 08 '15 at 16:47
  • This function does exist in the DataFrames package. – Luís de Sousa Oct 24 '18 at 06:29
  • I believe `read_rda` is no longer a function in (at least) v0.22.7 of the DataFrames package. However, I've been using the [RData.jl](https://github.com/JuliaData/RData.jl) package to load .rda files in Julia. – Chris Harshaw Jul 05 '21 at 17:01