julia> using Distributed
julia> addprocs()
12-element Array{Int64,1}:
4
5
6
7
8
9
10
11
12
13
14
15
julia> using DataFrames, GLM
julia> @everywhere function foo(df::DataFrame)
ols = lm(@formula(A ~ 1.0), df)
return coef(ols)
end
ERROR: On worker 2:
LoadError: UndefVarError: @formula not defined
...
julia> @everywhere using DataFrames, GLM
julia> @everywhere function foo(df::DataFrame)
ols = lm(@formula(A ~ 1.0), df)
return coef(ols)
end
julia>
Working.