/RData.jl

Read R data files from Julia

Primary LanguageJuliaOtherNOASSERTION

RData

Julia 0.4 Status Julia 0.5 Status

Coverage Status Build Status Build status

Read R data files (.rda, .RData) and optionally convert the contents into Julia equivalents.

Can read any R data archive, although not all R types could be converted into Julia.

Usage

To read R objects from "example.rda" file:

using RData

objs = load("path_to/example.rda")

The result is a dictionary of all R objects that are stored in "example.rda".

If convert=true keyword option is specified, load() will try to automatically convert R objects into Julia equivalents:

  • data frames into DataFrames.DataFrame
  • named vectors into DictoVec objects that allow indexing both by element indices and by names
  • ...

If the conversion to Julia type is not supported (e.g. R closure or language expression), the internal RData representation of the object will be provided.