Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Aug 21, 2023
1 parent 0da5321 commit e54dd06
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/descriptive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,19 @@ function MetidaBase.metida_table(obj::DataSet{DS}; sort = nothing, stats = nothi
union!(resset, Set(keys(obj[i].result)))
end
end

if !isnothing(stats)
stats STATLIST || error("Some statistics not known!")
if isa(stats, Symbol) stats = [stats] end
if !isnothing(sort)
if isnothing(sort)
ressetl = collect(intersect(resset, stats))
else
ressetl = sortbyvec!(collect(intersect(resset, stats)), sort)
end
else
if !isnothing(sort)
if isnothing(sort)
ressetl = collect(resset)
else
ressetl = sortbyvec!(collect(resset), sort)
end
end
Expand Down

0 comments on commit e54dd06

Please sign in to comment.