Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Aug 31, 2021
1 parent 3cdb493 commit 5a3b344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function subset(d::DataSet{T}, sort::Dict) where T <: AbstractIDResult
if length(inds) > 0 return DataSet(d.ds[inds]) end
DataSet(Vector{T}(undef, 0))
end
function subset(d::DataSet{T}, inds) where T
function subset(d::DataSet{T}, inds) where T
DataSet(getdata(d)[inds])
end
################################################################################
Expand Down Expand Up @@ -309,14 +309,17 @@ function metida_table_(obj::DataSet{RD}; order = nothing, results = nothing, ids
mt2 = metida_table_((obj[:, c] for c in ressetl)...; names = ressetl)
merge(mt1, mt2)
end
function metida_table(obj::DataSet{RD}; order = nothing, results = nothing, ids = nothing) where RD <: AbstractIDResult
metida_table(metida_table_(obj; order = order, results = results, ids = ids))
function metida_table(obj::DataSet{RD}; kwargs...) where RD <: AbstractIDResult
metida_table(metida_table_(obj; kwargs...))
end
################################################################################
# TypedTables.jl interface

function TypedTables.Table(obj::DataSet{RD}; order = nothing, results = nothing, ids = nothing) where RD <: AbstractIDResult
TypedTables.Table(metida_table_(obj; order = order, results = results, ids = ids))
function TypedTables.Table(obj::AbstractDataSet; kwargs...)
TypedTables.Table(metida_table_(obj; kwargs...))
end
function TypedTables.Table(obj::MetidaTable)
TypedTables.Table(obj.table)
end


Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ using Test, Tables, TypedTables, CSV
mt = MetidaBase.metida_table(exrsds)
mt = MetidaBase.metida_table(exrsds; results = :r1, ids = :a)
Table(exrsds; results = :r1, ids = [:a, :b])
#Table(exrsds)

v1 = [1,2,-6,missing,NaN]
itr1 = MetidaBase.skipnanormissing(v1)
Expand Down

2 comments on commit 5a3b344

@PharmCat
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/43894

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" 5a3b34488679a89d67420304d6e8c77912f8fd9b
git push origin v0.4.2

Please sign in to comment.