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

Unable to locate file .julia/v3.0/RDatasets/data/RDatasets/iris.rda #31

Closed VitorAguiar closed 9 years ago

VitorAguiar commented 9 years ago

I was using RDatasets yesterday without a problem, but today I'm getting this error (and I didn't update Julia or anything):

ERROR: Unable to locate file /Users/vitoraguiar/.julia/v0.3/RDatasets/data/RDatasets/iris.rda or /Users/vitoraguiar/.julia/v0.3/RDatasets/data/RDatasets/iris.csv.gz

 in error at error.jl:21
 in dataset at /Users/vitoraguiar/.julia/v0.3/RDatasets/src/dataset.jl:11

The correct location is actually

 /Users/vitoraguiar/.julia/v0.3/RDatasets/data/datasets/iris.rda

So I had to manually rename the directory:

cd /Users/vitoraguiar/.julia/v0.3/RDatasets/data/
mv datasets RDatasets

Now it works!

johnmyleswhite commented 9 years ago

Did you update any packages? Can you consistently reproduce the error?

VitorAguiar commented 9 years ago

I actually removed my julia, reinstalled it and restarted the computer. But I got the same error again.

I'm under Mac OS 10.10.2.

code:

using RDatasets
using DataFrames

iris = dataset("RDatasets", "iris")
johnmyleswhite commented 9 years ago

We need a little more information that that. What version of RDatasets are you using? What version of Julia are you using?

VitorAguiar commented 9 years ago

Julia v0.3.6

I'm using the version of RDatasets installed by Pkg.add("RDatasets")

julia> Pkg.status()
2 required packages:
 - DataFrames                    0.6.1
 - RDatasets                     0.1.1              75fb2ce8 (dirty)
7 additional packages:
 - ArrayViews                    0.4.9
 - Compat                        0.3.2
 - DataArrays                    0.2.11
 - GZip                          0.2.13
 - Reexport                      0.0.2
 - SortingAlgorithms             0.0.4
 - StatsBase                     0.6.12
dmbates commented 9 years ago

@VitorAguiar I think you want just dataset("datasets","iris") . RDatasets is the Julia package. The R package is just called datasets.

It is also possible to access such data with the RCall package.

using RCall, DataFrames

iris = DataFrame("iris")
johnmyleswhite commented 9 years ago

Thanks for noticing the error, @dmbates. Sounds like this isn't a bug then, but a confusion about how the function works.

VitorAguiar commented 9 years ago

Oh Yeah, I just noticed that! Sorry and thanks for making RDatasets.