Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World age error when running a basic example using GLM #204

Closed
IljaK91 opened this issue Dec 7, 2017 · 4 comments
Closed

World age error when running a basic example using GLM #204

IljaK91 opened this issue Dec 7, 2017 · 4 comments

Comments

@IljaK91
Copy link

IljaK91 commented Dec 7, 2017

A friend of mine has the following problem with a simple example using GLM:

using DataFrames, GLM

X=collect(0.1:0.2:1.1)
Y=collect(0.1:0.2:1.1)

data=DataFrame()
data[:X]=X
data[:Y]=Y

model_test = fit(LinearModel, @formula(Y ~ X),data)

This throws the following error:

ERROR: MethodError: no method matching @formula(::Expr)
The applicable method may be too new: running in world age 21842, while current world is 24127.
Closest candidates are:
  @formula(::ANY) at C:\Users\Julia_User\.julia\v0.6\DataFrames\src\statsmodels\formula.jl:20 (method too new to be called from this world context.) 

Does anybody know what this is about? I remember that I had the same problem some time ago, but after some tinkering the problem solved itself somehow. I am using Atom/Juno and my friend is using EMACS, if that plays a role. We are both on Julia 0.6.1 and use the most up-to-date version of GLM.

@nalimilan
Copy link
Member

Looks like the versions of GLM, DataFrames and StatsModels are not in sync. If you are indeed using the latest GLM version, the DataFrames version you have is too old, as it's not supposed to export @formula at all now. Can you check what versions you are using?

@IljaK91
Copy link
Author

IljaK91 commented Dec 7, 2017

DataFrames: 0.10.1
GLM: 0.8.1
StatsModels: 0.0.2, which we had to install now.

Other Stats packages:
StatsBase: 0.5.0
StatsFuns: 0.2.0

The same code works in the REPL.

@IljaK91
Copy link
Author

IljaK91 commented Dec 7, 2017

It seems to work now in Atom/Juno, but the error remains using EMACS/ESS. The issue can be closed.

@IljaK91 IljaK91 closed this as completed Dec 7, 2017
@nalimilan
Copy link
Member

OK, cool. You don't actually need StatsModels as long as you're using DataFrames 0.10.1, and things are supposed to work. Maybe related to package caches? You could try to remove the files for GLM and DataFrames under C:\Users\Julia_User\.julia\v0.6\lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants