JuliaStats / RDatasets.jl

Julia package for loading many of the data sets available in R
GNU General Public License v3.0
160 stars 56 forks source link

Julia hangs up when I try to obtain data from Rdatasets #9

Closed zhujinxuan closed 11 years ago

zhujinxuan commented 11 years ago

Here is my code:

require("RDatasets")
using RDatasets
iris = data("datasets", "iris")

The last sentence iris = data("datasets", "iris") keeps running and julia hangs

milktrader commented 11 years ago

Known issue with DataFrames here: https://github.com/HarlanH/DataFrames.jl/issues/216.

Can you try using the latest DataFrames commit? This was temporarily fixed a few hours ago.

zhujinxuan commented 11 years ago

After I run Pkg.update() , the problem still exists

I forgot to say, this is the warning message after using RDatasets

Warning: New definition 
    getindex(DataArray{T,N},Union(BitArray{1},Array{Bool,1})) at /home/lenovo/.julia/DataFrames/src/dataarray.jl:342
is ambiguous with 
    getindex(DataArray{T<:Number,N},Union(Array{T,1},BitArray{1},Ranges{T})) at /home/lenovo/.julia/DataFrames/src/dataarray.jl:339.
Make sure 
    getindex(DataArray{T<:Number,N},Union(BitArray{1},Array{Bool,1}))
is defined first.
milktrader commented 11 years ago

yep, that's the ambiguity warning that was fixed in recent commits. It's not causing the infinite loop that hangs DataFrame creation though. What version of Julia do you have? Are you on master (0.2) or on 0.1?

zhujinxuan commented 11 years ago

Version is master(0.2).

zhujinxuan commented 11 years ago

I have just degrade julia to version 1.0. The problem doesn't exist on that version. Thank you.

johnmyleswhite commented 11 years ago

Ok. Sorry for the confusion!