Hi,
I performed a NCA analysis of a data with extravascular administration(apparent clearance is represented as cl_f_obs
) and got the below error while trying to generate the report.
julia> report(NCA_Report, output="nca_report_pdf")
ERROR: ArgumentError: column name :cl not found in the data frame; existing most similar names are: :id and :kel
Stacktrace:
[1] lookupname
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/MA4YO/src/other/index.jl:395 [inlined]
[2] getindex
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/MA4YO/src/other/index.jl:401 [inlined]
[3] (::DataFrames.var"#35#36"{DataFrames.Index})(i::Symbol)
@ DataFrames ./none:0
[4] iterate
@ ./generator.jl:47 [inlined]
[5] collect_to!
@ ./array.jl:782 [inlined]
[6] collect_to_with_first!
@ ./array.jl:760 [inlined]
[7] collect(itr::Base.Generator{Vector{Symbol}, DataFrames.var"#35#36"{DataFrames.Index}})
@ Base ./array.jl:734
[8] getindex
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/MA4YO/src/other/index.jl:407 [inlined]
[9] stack(df::DataFrame, measure_vars::Vector{Symbol}, id_vars::Vector{Symbol}; variable_name::Symbol, value_name::Symbol, view::Bool, variable_eltype::Type)
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/MA4YO/src/abstractdataframe/reshape.jl:144
[10] summarize(data::DataFrame; stratify_by::Vector{Symbol}, parameters::Vector{Symbol}, stats::Vector{Function})
@ NCA /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NCA/LWAon/src/type.jl:627
[11] summarize(data::DataFrame)
@ NCA /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NCA/LWAon/src/type.jl:620
[12] top-level scope
@ ~/data/code/NCA_MCOPS/NCA_MCOPS.jl:97
I am using Julia version 1.7.1 with NCA and NCAUtilities
packages and have the following questions
- How to interpret this error and generate a report successfully?
- The NCA results when saved as a dataframe gives the parameter values along with its units in each cell. How to restrict the units only to the column headers?