Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Jul 11, 2021
1 parent 32614a2 commit d601233
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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.1.2"
version = "0.2.0"

[deps]
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
Expand Down
15 changes: 14 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end
Base.first(ds::DataSet) = first(ds.data)

function Base.getindex(ds::DataSet{T}, col::Colon, ind) where T <: AbstractResultData
v = Vector{Any}(undef, length(ds))
v = Vector{Float64}(undef, length(ds))
@inbounds for i = 1:length(ds)
v[i] = getindormiss(ds[i].result, ind)
end
Expand All @@ -44,6 +44,19 @@ function Base.getindex(ds::DataSet{T}, col::Int, ind) where T <: AbstractResultD
getindormiss(ds[col].result, ind)
end

function getid(ds::DataSet{T}, col::Colon, ind) where T <: AbstractIdData
v = Vector{Any}(undef, length(ds))
@inbounds for i = 1:length(ds)
v[i] = getindormiss(ds[i].id, ind)
end
v
end

function getid(ds::DataSet{T}, col::Int, ind) where T <: AbstractIdData
getindormiss(ds[col].id, ind)
end



function Base.length(ds::DataSet)
length(ds.data)
Expand Down

2 comments on commit d601233

@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/40695

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

Please sign in to comment.