Skip to content

Commit

Permalink
Merge pull request #2 from PharmCat/10.2
Browse files Browse the repository at this point in the history
10.2
  • Loading branch information
PharmCat authored Dec 11, 2022
2 parents 7e21def + a29c529 commit 7fcb7d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MetidaBase"
uuid = "075456b7-4006-432f-9324-2f8453996c49"
authors = ["PharmCat <[email protected]> and contributors"]
version = "0.10.1"
version = "0.10.2"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -16,7 +16,7 @@ CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"

[compat]
CategoricalArrays = "0.8, 0.9, 0.10"
DataFrames = "0.22, 1"
DataFrames = "1"
Distributions = "0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
StatsBase = "0.29, 0.30, 0.31, 0.32, 0.33"
StatsModels = "0.6"
Expand Down
16 changes: 16 additions & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ function Base.getindex(d::DataSet, ind::Int)
d.ds[ind]
end

Base.getindex(d::DataSet, inds::UnitRange{Int64}) = subset(d, inds)


@inline function getresultindex_safe(rd::T, ind::Symbol) where T <: AbstractResultData
getindormiss(rd.result, ind)
end
Expand Down Expand Up @@ -350,6 +353,19 @@ function uniqueidlist(d::DataSet{T}, list::Symbol) where T <: AbstractIdData
end
dl
end
#=
function uniqueidlist(d::DataSet{T}) where T <: AbstractIdData
dl = Vector{Dict}(undef, 0)
for i in d
id = getid(i)
if id ∉ dl push!(dl, id) end
end
dl
end
=#
function uniqueidlist(::DataSet{T}, ::Nothing) where T <: AbstractIdData
nothing
end


function subset(d::DataSet{T}, sort::Dict) where T <: AbstractIdData
Expand Down

2 comments on commit 7fcb7d7

@PharmCat
Copy link
Owner Author

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/73920

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.10.2 -m "<description of version>" 7fcb7d7a838b7ccbdd6c2f324fb1765073ad0e26
git push origin v0.10.2

Please sign in to comment.