Skip to content

Commit

Permalink
1251 group (#1263)
Browse files Browse the repository at this point in the history
* Fixes #1251 Outputs grouped by groupID in time profile and residuals

* Update tests to account for new outcomes

* Add Group column in qualification simulated data.frame
  • Loading branch information
pchelle authored Aug 13, 2024
1 parent e50ef09 commit 271f79f
Show file tree
Hide file tree
Showing 27 changed files with 1,148 additions and 1,127 deletions.
9 changes: 9 additions & 0 deletions R/captions.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,15 @@ getDataSourceCaption <- function(structureSet) {
}

getGoodnessOfFitCaptions <- function(structureSet, plotType, plotScale = "linear", settings = NULL) {
if (is.null(structureSet)) {
plotCaption <- captions$plotGoF[[plotType]](
simulationSetName = settings$simulationSetNames,
descriptor = settings$simulationSetDescriptor,
plotScale = plotScale,
pathName = settings$groupID
)
return(plotCaption)
}
dataSource <- getDataSourceCaption(structureSet)
simulationSetName <- structureSet$simulationSet$simulationSetName
setDescriptor <- structureSet$simulationSetDescriptor
Expand Down
30 changes: 30 additions & 0 deletions R/error-checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -661,3 +661,33 @@ checkSamePopulationIds <- function(setIds,
)
return(invisible())
}

#' @title checkMetaDataIsConsistent
#' @description
#' Check consistency of metadata units, dimensions and residuals scale
#' @param metaData A data.frame summarizing meta data of multiple `SimulationSet` and `Output` objects
#' @keywords internal
checkMetaDataIsConsistent <- function(metaData) {
groupId <- unique(metaData$group)
if(!isOfLength(unique(metaData$unit), 1)){
warning(
messages$inconsistentMetaData(
values = metaData$unit,
id = groupId,
dataType = "units"
),
call. = FALSE
)
}
if(!isOfLength(unique(metaData$residualScale), 1)){
warning(
messages$inconsistentMetaData(
values = metaData$residualScale,
id = groupId,
dataType = "residualScale"
),
call. = FALSE
)
}
return()
}
Loading

0 comments on commit 271f79f

Please sign in to comment.