If parameterPaths is NULL (can happen when you retrieve paths programatically) then sensitivityCalculation() returns an error about missing column (because result dataframe is empty I think).
I think there should be aditionnal check to make sure that the provided parameterPaths argument is not NULL and also that the pkData is not NULL or an empty dataframe.
Thanks to Luis that helped us find out about this.
devtools::load_all()
#> ℹ Loading esqlabsR
#> Loading required package: ospsuite
#>
#> Loading required package: rSharp
simPath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
simulation <- loadSimulation(simPath)
outputPaths <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
variationRange <- c(0.1, 2, 20) # 1.0 is deliberately left out for testing
parameterPaths <- NULL
results <- sensitivityCalculation(
simulation = simulation,
outputPaths = outputPaths,
parameterPaths = parameterPaths,
variationRange = variationRange
)
#> Error in `dplyr::filter()` at esqlabsR/R/sensitivity-calculation.R:229:5:
#> ℹ In argument: `PKParameter %in% filterValues`.
#> Caused by error:
#> ! object 'PKParameter' not found
If parameterPaths is NULL (can happen when you retrieve paths programatically) then
sensitivityCalculation()
returns an error about missing column (because result dataframe is empty I think).I think there should be aditionnal check to make sure that the provided
parameterPaths
argument is notNULL
and also that thepkData
is notNULL
or an empty dataframe.Thanks to Luis that helped us find out about this.
Created on 2024-09-16 with reprex v2.1.1