diff --git a/docs/example_data.jl b/docs/example_data.jl index 8e4aa58b..ed27d0d6 100644 --- a/docs/example_data.jl +++ b/docs/example_data.jl @@ -17,17 +17,23 @@ Datasets: **Return Value:** `DataFrame`. """ function example_data(example = "pattern_detection_values"; mode = 1) + if mode == 1 + datapath = dirname(dirname(Base.current_project())) * "/data/evts_d.csv" + else + datapath = dirname(Base.current_project()) * "/data/evts_d.csv" + end if example == "pattern_detection_values" - if mode == 1 - datapath = dirname(dirname(Base.current_project())) * "/data/evts_d.csv" - else - datapath = dirname(Base.current_project()) * "/data/evts_d.csv" - end evts_d = CSV.read(datapath, DataFrame) pattern_detection_values = stack(evts_d) rename!(pattern_detection_values, :variable => :condition, :value => :estimate) evts_d = nothing return pattern_detection_values + elseif example == "pattern_detection_values_32" + evts_d = CSV.read(datapath, DataFrame) + pattern_detection_values = stack(evts_d[1:32, :]) + rename!(pattern_detection_values, :variable => :condition, :value => :estimate) + evts_d = nothing + return pattern_detection_values else error("unknown example data") end