julia> pop = read_nca(dfNCA,
id = :id,
ii = :ii,
ss = :ss,
time = :time,
observations = :Cparent_ipred,
amt = :amt,
route = :route,
group = [:id, :DOSE_N] )
ERROR: MethodError: Cannot `convert` an object of type Missing to an object of type Float64
Closest candidates are:
convert(::Type{T}, ::ColorTypes.Gray24) where T<:Real at /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/ColorTypes/1dGw6/src/conversions.jl:114
convert(::Type{T}, ::ColorTypes.Gray) where T<:Real at /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/ColorTypes/1dGw6/src/conversions.jl:113
convert(::Type{T}, ::Gain) where T<:Real at /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Unitful/ApCuY/src/logarithm.jl:62
...
Stacktrace:
[1] NCADose(time::Float64, amt::Float64, duration::Missing, route::NCA.Route, ii::Int64, ss::Bool)
@ NCA /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/NCA/CDayS/src/type.jl:37
[2] _broadcast_getindex_evalf
@ ./broadcast.jl:670 [inlined]
[3] _broadcast_getindex
@ ./broadcast.jl:643 [inlined]
[4] getindex
@ ./broadcast.jl:597 [inlined]
[5] copy
@ ./broadcast.jl:875 [inlined]
[6] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}, Nothing, Type{NCADose}, Tuple{Float64, Float64, Base.RefValue{Missing}, Base.RefValue{NCA.Route}, Int64, Bool}})
@ Base.Broadcast ./broadcast.jl:860
[7] (::NCA.var"#292#303"{Nothing, Symbol, Symbol, Symbol, Symbol, Vector{Pair{String, String}}, Bool, Bool, Bool, Bool, Bool, Nothing, Nothing, Nothing, Nothing, Vector{Union{Missing, Float64}}, Vector{Union{Missing, Int64}}, Vector{Int64}, Bool})(::Tuple{Int64, String})
@ NCA /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/NCA/CDayS/src/data_parsing.jl:287
[8] iterate
@ ./generator.jl:47 [inlined]
[9] collect(itr::Base.Generator{Base.Iterators.Enumerate{Vector{String}}, NCA.var"#292#303"{Nothing, Symbol, Symbol, Symbol, Symbol, Vector{Pair{String, String}}, Bool, Bool, Bool, Bool, Bool, Nothing, Nothing, Nothing, Nothing, Vector{Union{Missing, Float64}}, Vector{Union{Missing, Int64}}, Vector{Int64}, Bool}})
@ Base ./array.jl:724
[10] map(f::Function, A::Base.Iterators.Enumerate{Vector{String}})
@ Base ./abstractarray.jl:2896
[11] ___read_nca(df::DataFrame; id::Symbol, time::Symbol, observations::Symbol, nominal_time::Symbol, start_time::Symbol, end_time::Symbol, volume::Symbol, amt::Symbol, route::Symbol, duration::Symbol, blq::Symbol, ii::Symbol, ss::Symbol, group::Vector{Pair{String, String}}, concu::Bool, timeu::Bool, amtu::Bool, volumeu::Bool, verbose::Bool, sparse::Bool, lambdazidxs::Nothing, lambdazslopetimes::Nothing, concblq::Nothing, llq::Nothing, missingconc::Nothing, missingvolume::Nothing)
@ NCA /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/NCA/CDayS/src/data_parsing.jl:230
[12] (::NCA.var"#284#286"{Vector{Symbol}, Base.Pairs{Symbol, Symbol, NTuple{7, Symbol}, NamedTuple{(:id, :ii, :ss, :time, :observations, :amt, :route), NTuple{7, Symbol}}}})(df::SubDataFrame{DataFrame, DataFrames.Index, Vector{Int64}})
@ NCA /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/NCA/CDayS/src/data_parsing.jl:68
[13] mapreduce_impl(f::NCA.var"#284#286"{Vector{Symbol}, Base.Pairs{Symbol, Symbol, NTuple{7, Symbol}, NamedTuple{(:id, :ii, :ss, :time, :observations, :amt, :route), NTuple{7, Symbol}}}}, op::typeof(vcat), A::Vector{Any}, ifirst::Int64, ilast::Int64, blksize::Int64)
@ Base ./reduce.jl:244
[14] mapreduce_impl
@ ./reduce.jl:259 [inlined]
[15] _mapreduce(f::NCA.var"#284#286"{Vector{Symbol}, Base.Pairs{Symbol, Symbol, NTuple{7, Symbol}, NamedTuple{(:id, :ii, :ss, :time, :observations, :amt, :route), NTuple{7, Symbol}}}}, op::typeof(vcat), #unused#::IndexLinear, A::Vector{Any})
@ Base ./reduce.jl:417
[16] _mapreduce_dim
@ ./reducedim.jl:330 [inlined]
[17] #mapreduce#731
@ ./reducedim.jl:322 [inlined]
[18] mapreduce
@ ./reducedim.jl:322 [inlined]
[19] read_nca(df::DataFrame; group::Vector{Symbol}, kwargs::Base.Pairs{Symbol, Symbol, NTuple{7, Symbol}, NamedTuple{(:id, :ii, :ss, :time, :observations, :amt, :route), NTuple{7, Symbol}}})
@ NCA /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/NCA/CDayS/src/data_parsing.jl:62
[20] top-level scope
@ ~/data/code/SEL/SEL_pumas.jl:33