zlisto / Daily-Fantasy-Baseball-Contests-in-DraftKings

This is the code for constructing a portfolio of lineups for DraftKings baseball contests with a top heavy payoff structure. This code is based on the paper Picking Winners Using Integer Programming by David Hunter, Juan Pablo Vielma, and Tauhid Zaman (https://arxiv.org/abs/1604.01455).
37 stars 27 forks source link

ERROR: LoadError: UndefVarError: DataArrays not defined #1

Open escism opened 6 years ago

escism commented 6 years ago

I'm getting the following error when I run the program:

ERROR: LoadError: UndefVarError: DataArrays not defined Stacktrace: [1] clean_order(::Array{Union{Missings.Missing, String},1}) at /Users/escism/Desktop/DFS/Baseball/data_cleaning.jl:10 [2] read_player_data(::String, ::String) at /Users/escism/Desktop/DFS/Baseball/data_cleaning.jl:61 [3] create_lineups(::Int64, ::Int64, ::Int64, ::#baseball_formulation, ::String, ::String, ::String) at /Users/escism/Desktop/DFS/Baseball/data_cleaning.jl:196 [4] include_from_node1(::String) at ./loading.jl:576 [5] include(::String) at ./sysimg.jl:14 while loading /Users/escism/Desktop/DFS/Baseball/optimize_multiple_lineups_baseball.jl, in expression starting on line 44

Any insight in how to fix and edit that issue?

jnederlo commented 6 years ago

@escism

DataArrays is a package. So to fix the error first you need to run

Pkg.add("DataArrays")

in Julia, then in the data_cleaning.jl file you need to add the following to the top of the document

using DataArrays

That should solve your issue.