Giter Club home page Giter Club logo

rdata.jl's People

Contributors

alyst avatar andreasnoack avatar ararslan avatar bjarthur avatar bkamins avatar dcjones avatar dmbates avatar garborg avatar github-actions[bot] avatar greimel avatar harlanh avatar johnmyleswhite avatar jsams avatar kleinschmidt avatar kmsquire avatar matthieugomez avatar munckymagik avatar nalimilan avatar powerdistribution avatar quinnj avatar rofinn avatar simonster avatar spaette avatar staticfloat avatar tshort avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdata.jl's Issues

Precompile the module

It appears that when introducing a dependency on RData to DataFrames (temporarily, while read_rda is in its deprecation period), we're getting lots of errors because DataFrames precompiles and RData does not. To fix this, we can simply add __precompile__() above the module statement. Once this is done we should tag a new patch release.

I can submit a PR for this later if no one beats me to it.

Ref JuliaData/DataFrames.jl#1031

Undefined method error with 0.3 and master

Never mind - after a few Pkg.rm and Pkg.add cycles it started working again!

et-imac-retina:Desktop sjbespa$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.2 (2017-12-13 18:08 UTC)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |  x86_64-apple-darwin17.3.0

julia> using RData

julia> a = load("/Users/sjbespa/Desktop/eclsk98.k-8.id.Rda" ,convert=true)
Error encountered while loading "/Users/sjbespa/Desktop/eclsk98.k-8.id.Rda".
Fatal error:
ERROR: UndefVarError: load not defined
Stacktrace:
 [1] #load#20(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:GZIP}}) at /Users/sjbespa/.julia/v0.6/FileIO/src/loadsave.jl:95
 [2] (::FileIO.#kw##load)(::Array{Any,1}, ::FileIO.#load, ::FileIO.File{FileIO.DataFormat{:GZIP}}) at ./<missing>:0
 [3] #load#13(::Array{Any,1}, ::Function, ::String) at /Users/sjbespa/.julia/v0.6/FileIO/src/loadsave.jl:52
 [4] (::FileIO.#kw##load)(::Array{Any,1}, ::FileIO.#load, ::String) at ./<missing>:0

Dates Dependency

Hi,

Since the switch to Project.toml, I'm getting this compilation warning in my custom package:

┌ Warning: Package RData does not have Dates in its dependencies:
│ - If you have RData checked out for development and have
│   added Dates as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with RData
└ Loading Dates into RData from project dependency, future warnings for RData are suppressed.

Maybe Dates can be added as a dependency ?

Thanks

ERROR: UndefVarError: load not defined

Hi,

I am trying to use your package but get the following error:

julia> using RData

julia> import CodecBzip2

julia> test = load("data.RDS")
Error encountered while load FileIO.File{FileIO.DataFormat{:GZIP}, String}("data.RDS").

Fatal error:
ERROR: UndefVarError: load not defined

Also handle RDS files

R has a second binary storage format for single objects called "RDS". saveRDS() and readRDS() are the equivalent of save() and load(). Some people find this file type more convenient because readRDS() returns the object rather than placing it into the global namespace (possibly clobbering something else). The file format is the same as for RData, minus the header that lists the objects in the file. I would guess that RDS files could be supported in RData.jl with minor additions, but I haven't done my homework on that just yet.

Save julia objects as RData

Probably going to be tough work but I thought would be great if the package can function the other way by allowing us to save Julia objects as .RData. At least for julia DataFrames objects.

Convert R's 32-bit integers to native integers

Although R is cursed to support only 32-bit integers, it would be convenient to have an option in RData.jl to convert all such integers to the native integer type (Int), which these days is usually 64 bits.

revision needed for Julia v0.7

The treatment of load needs revision to follow the instructions on the FileIO README regarding scope. (Perhaps just stop importing and exporting.)

The implementation of keyword arguments is changed for v0.7, so the conversion to internals needs to be rewritten. (Sorry, I don't know the details myself.)

Version 3 R serialization format

R 3.5.0 switched to version 3 serialization format, so RData.jl needs to support that.
On the first glance, it looks like it's mostly compatible with the version 2 with the exception of the new user-defined serialization ALTREP.

Todo for the RData.jl:

  • make sure RData.jl reads both v2 and v3 files; for that generate_rda.R have to be updated to generate v2 and v3 versions (which would make this R script v3.5-only), and tests have to be updated to read both files
  • support ALTREP. As with the other "exotic" SEXPs like RAW, just support reading it into some internal structure, so that the whole RDA file could be read.

Add "unique_colnames" keyword option to load()

As mentioned in #44 , it would be nice to add unique_colnames=true option to load(), which would propagate to DataFrame({r data frame}, makeunique=unique_colnames).
That will make the default behaviour reasonable, while still allowing the user to control it.

RDataException

It would be nice to throw some RData-specific exception type instead of error, it can also contain some useful information, like current io position or the name of the top-level element being read.

Feature request: support for attributes

I know it can be tough, since Julia doesn't support anything similar, but many people (including me) store important metadata in attributes.

I guess objects' metadata should be inserted as distinct items in the resulting dictionary.

E.g. if I read object a generated as

a<-"text"
attr(a, 'label') <- 'my label'
save("a", file="obj_a.rda")

then it should produce dictionary with two entries:

  1. "a" → "Kuku!"
  2. "a|label" → "my label"

Character | can be replaced with any other character that cannot occur in variable's name.

Support POSIXct and Date objects

I haven't worked too much with dates in Julia yet, but I'm trying to import some data right now from R, and the formats are typically in R's Date or POSIXct format. Seems as if there are date and time types in julia that these should map on to. Can we get support for these types? All of my datasets involve the use of time! Right now these are imported as Floats, presumably as an offset from the standard unix date, though number of days for the Date type, and number of seconds for the POSIXct type.

Gadfly tests are failing due to a RData error

This doesn't make much sense to me, but running Pkg.test("Gadfly") on Gadfly master gives me:

WARNING: FileIO.LoaderError("RData","load not defined")
 in #load#17(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:83
 in load(::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:73
 in #load#13(::Array{Any,1}, ::Function, ::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in dataset(::String, ::String) at /Users/tamasnagy/.julia/v0.5/RDatasets/src/dataset.jl:6
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:504
 in run_tests(::String) at /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl:142
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
FAILED!
ERROR: LoadError: LoadError: RData load error: load not defined
  Will try next loader.

 in #load#17(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:83
 in load(::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:73
 in #load#13(::Array{Any,1}, ::Function, ::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in dataset(::String, ::String) at /Users/tamasnagy/.julia/v0.5/RDatasets/src/dataset.jl:6
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:504
 in run_tests(::String) at /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl:142
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/tamasnagy/.julia/v0.5/Gadfly/test/points.jl, in expression starting on line 4
while loading /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl, in expression starting on line 187

see https://travis-ci.org/dcjones/Gadfly.jl/jobs/164972396

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

NA interpreted as NaN in Gcsemv data set

When reading data set Gcsemv from R package mlmRev, NA values appear as NaN:

julia> using RDatasets, DataFrames

julia> dataset("mlmRev","Gcsemv")
1905×5 DataFrames.DataFrame
│ Row  │ School  │ Student │ Gender │ Written │ Course │
├──────┼─────────┼─────────┼────────┼─────────┼────────┤
│ 1"20920""16""M"23.0NaN    │
│ 2"20920""25""F"NaN71.2   │
│ 3"20920""27""F"39.076.8   │
│ 4"20920""31""F"36.087.9   │
│ 5"20920""42""M"16.044.4   │
│ 6"20920""62""F"36.0NaN    │
│ 7"20920""101""F"49.089.81898"84772""66""F"59.091.6   │
│ 1899"84772""75""F"53.0NaN    │
│ 1900"84772""85""F"NaN90.7   │
│ 1901"84772""95""F"65.094.4   │
│ 1902"84772""104""M"65.060.1   │
│ 1903"84772""105""M"48.0NaN    │
│ 1904"84772""111""M"71.0NaN    │
│ 1905"84772""114""M"66.082.4

This can be reproduced after installing RDatasets.jl via RData.load(".julia/RDatasets/data/mlmRev/Gcsemv.rda").

Issue moved from JuliaData/DataFrames.jl#958. Contrary to what the original reporter said, this problem also happens under Linux.

isna MethodError

Hey I'm trying to read this file and I'm getting the error ERROR: MethodError: no method matching isna(::RData.RVector{Float64,0x0e}) ?

duplicate method definition for unix2zdt

julia> using RData
WARNING: Method definition unix2zdt(Real) in module TimeZones at /Users/arthurb/.julia/v0.6/TimeZones/src/conversions.jl:122 overwritten in module RData at /Users/arthurb/.julia/v0.6/RData/src/convert.jl:201.

Moving to JuliaData organisation

RData was welcomed at JuliaStats when DataFrames and Co lived here.
Since that DataFrames has found a new home in JuliaData.
Here, amidst the snobbish statistical methods, RData feels lonely and separated from CSV.jl, Feather.jl and its other siblings.
Time to reunite?

cc @nalimilan

filename.RData vs filename.Rdata

So I have an Rdata file, as seen below:
image

The file extension is clearly Rdata. However, I get the following when reading it:

julia> using RData

julia> objs = load(joinpath(datadir, "data.Rdata"))
Error encountered while load FileIO.File{FileIO.DataFormat{:GZIP}, String}("C:\\Users\\username\\GeekyStuff\\Data\\data.Rdata").

Fatal error:
ERROR: Libz load error: neither load nor fileio_load is defined
  due to FileIO.SpecError(Libz, :load)
  Will try next loader.

Stacktrace:
 [1] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:209
 [2] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:197 [inlined]
 [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185
 [4] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185 [inlined]
 [5] load(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:113
 [6] load(::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:110
 [7] top-level scope
   @ REPL[19]:1
Stacktrace:
 [1] handle_error(e::FileIO.LoaderError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\error_handling.jl:61
 [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\error_handling.jl:56
 [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:228
 [4] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:197 [inlined]
 [5] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185
 [6] action
   @ C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:185 [inlined]
 [7] load(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:113
 [8] load(::String)
   @ FileIO C:\Users\username\.julia\packages\FileIO\QkYgA\src\loadsave.jl:110
 [9] top-level scope
   @ REPL[19]:1

However, it works fine if I pretend the extension is RData:

julia> objs = load(joinpath(datadir, "data.RData"))
Dict{String, Any} with 1 entry:
  "ciphers" => [1.0 1.0  0.0 0.0; 1.0 1.0  0.0 0.0;  ; 1.0 8.0  0.0 0.0; 1.0 8.0  0.0 0.0]

The error gives no hint about this - I found it from the final comment in this discourse post.

What to do about it

Optimally, this package could figure this problem out on its own. Second best, the error message could suggest changing the file extension from Rdata to RData or rda.

RData can't load .rda files with [email protected] but can with [email protected]

[email protected] causes RData to throw a load error which can be solved by downgrading to [email protected].

 pkg> status
      Status `~/Repos/juliaplotting/Project.toml`
  [5789e2e9] FileIO v1.10.0
  [91a5bcdd] Plots v1.16.5
  [c3e4b0f8] Pluto v0.14.8
  [ce6b1742] RDatasets v0.7.5
julia> using RDatasets
julia> iris = dataset("datasets", "iris")
Error encountered while load FileIO.File{FileIO.DataFormat{:RData}, String}("/home/jonas/.julia/packages/RDatasets/eRbZP/src/../data/datasets/iris.rda").

Fatal error:
ERROR: RData load error: neither load nor fileio_load is defined
  due to MethodError(seek, (TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream}(<mode=close>), 0), 0x00000000000073cb)
  Will try next loader.

Stacktrace:
  [1] getlength(io::TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream}, pos::Int64)
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/query.jl:62
  [2] getlength(io::TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/query.jl:60
  [3] detect_rdata(io::TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/registry.jl:62
  [4] fileio_load(s::FileIO.Stream{FileIO.DataFormat{:RData}, TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream}, String}; kwoptions::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ RData ~/.julia/packages/RData/Re6gn/src/RData.jl:53
  [5] fileio_load(s::FileIO.Stream{FileIO.DataFormat{:RData}, TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream}, String})
    @ RData ~/.julia/packages/RData/Re6gn/src/RData.jl:52
  [6] fileio_load(f::FileIO.File{FileIO.DataFormat{:RData}, String}; kwoptions::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ RData ~/.julia/packages/RData/Re6gn/src/RData.jl:95
  [7] fileio_load(f::FileIO.File{FileIO.DataFormat{:RData}, String})
    @ RData ~/.julia/packages/RData/Re6gn/src/RData.jl:92
  [8] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
  [9] invokelatest
    @ ./essentials.jl:706 [inlined]
 [10] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:217
 [11] action
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:197 [inlined]
 [12] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:185
 [13] action
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:185 [inlined]
 [14] load(::String; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:113
 [15] load
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:110 [inlined]
 [16] dataset(package_name::String, dataset_name::String)
    @ RDatasets ~/.julia/packages/RDatasets/eRbZP/src/dataset.jl:12
 [17] top-level scope
    @ REPL[2]:1
 [18] eval
    @ ./boot.jl:360 [inlined]
 [19] eval_user_input(ast::Any, backend::REPL.REPLBackend)
    @ REPL /opt/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
 [20] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL /opt/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
 [21] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL /opt/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
 [22] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL /opt/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
 [23] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL /opt/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
 [24] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:387
 [25] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [26] invokelatest
    @ ./essentials.jl:706 [inlined]
 [27] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:372
 [28] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:302
 [29] _start()
    @ Base ./client.jl:485
Stacktrace:
  [1] handle_error(e::FileIO.LoaderError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/error_handling.jl:61
  [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector{T} where T}}, action::String)
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/error_handling.jl:56
  [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:226
  [4] action
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:197 [inlined]
  [5] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Symbol, ::String; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:185
  [6] action
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:185 [inlined]
  [7] load(::String; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FileIO ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:113
  [8] load
    @ ~/.julia/packages/FileIO/LoVdY/src/loadsave.jl:110 [inlined]
  [9] dataset(package_name::String, dataset_name::String)
    @ RDatasets ~/.julia/packages/RDatasets/eRbZP/src/dataset.jl:12
 [10] top-level scope
    @ REPL[2]:1
 pkg> add FileIO@1.9.0
... 

julia> iris = dataset("datasets", "iris")
150×5 DataFrame
 Row │ SepalLength  SepalWidth  PetalLength  PetalWidth  Species   
     │ Float64      Float64     Float64      Float64     Cat      
─────┼─────────────────────────────────────────────────────────────
   15.1         3.5          1.4         0.2  setosa
   24.9         3.0          1.4         0.2  setosa
                                               
 1496.2         3.4          5.4         2.3  virginica
 1505.9         3.0          5.1         1.8  virginica
                                                   146 rows omitted

Compatibility with FileIO.jl v1.6

With FileIO.jl v1.6.2 and RData v0.7.3, I got the following error:

julia> using RData

julia> load("FILE.rda")
ERROR: No applicable_loaders found for UNKNOWN

There is no more error after downgrading FileIO to v1.5. Hence, it seems to be the lack of support with the new version.

load not working

In R:
titanic <- data.frame(Titanic); save(titanic, file = "titanic.rdata")

In Julia:
titanic = RData.load("titanic.rdata", convert=true)

Does not result in a DataFrame as I think convert=true suggests it would.

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.