From 32614a2e2072cbc9427be822a143f444aab15b56 Mon Sep 17 00:00:00 2001 From: PharmCat Date: Sun, 11 Jul 2021 19:24:02 +0300 Subject: [PATCH] update --- Project.toml | 2 ++ src/MetidaBase.jl | 4 ++-- src/types.jl | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 7c4bad4..5345cb8 100644 --- a/Project.toml +++ b/Project.toml @@ -6,11 +6,13 @@ version = "0.1.2" [deps] StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" [compat] julia = "1" StatsModels = "0.6" Tables = "1" +PrettyTables = "1" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/MetidaBase.jl b/src/MetidaBase.jl index fa502ec..cee9790 100644 --- a/src/MetidaBase.jl +++ b/src/MetidaBase.jl @@ -4,13 +4,13 @@ __precompile__(true) module MetidaBase - using Tables, StatsModels + using Tables, StatsModels, PrettyTables import Tables: istable, columnaccess, columns, getcolumn, columnnames import StatsModels: StatisticalModel - import Base: getindex, length, ht_keyindex + import Base: getindex, length, ht_keyindex, show include("abstracttype.jl") include("types.jl") diff --git a/src/types.jl b/src/types.jl index 2973514..8c0547d 100644 --- a/src/types.jl +++ b/src/types.jl @@ -17,6 +17,10 @@ Tables.getcolumn(t::MetidaTable, nm::Symbol) = t.table[nm] Tables.columnnames(t::MetidaTable) = collect(keys(t.table)) +function Base.show(io::IO, table::MetidaTable) + pretty_table(io, table) +end + # All struct DataSet{T <: AbstractData}