Nothing
## Copyright(c) 2017-2026 R. Mark Sharp
## This file is part of nprcgenekeepr
#' Determine if Changed Columns tab should be displayed
#'
#' Checks the changedCols list to determine if the Changed Columns tab should
#' be inserted into the application navigation. The tab is shown when column
#' names were modified during QC processing.
#'
#' @param changedCols list containing information about changed column names.
#' Expected fields include: \code{caseChange}, \code{spaceRemoved},
#' \code{periodRemoved}, \code{underScoreRemoved}, \code{egoToId},
#' \code{egoidToId}, \code{sireIdToSire}, \code{damIdToDam},
#' \code{birthdateToBirth}, \code{deathdateToDeath},
#' \code{recordstatusToRecordStatus}, \code{fromcenterToFromCenter}.
#'
#' @return Logical. TRUE if columns were changed and tab should be shown,
#' FALSE otherwise.
#'
#' @seealso \code{\link{checkChangedColsLst}} for the original implementation
#' @export
#' @examples
#' library(nprcgenekeepr)
#' ## No column changes recorded: the tab stays hidden.
#' shouldShowChangedColsTab(list())
#' ## A recorded case change: the tab should be shown.
#' shouldShowChangedColsTab(list(caseChange = c(Id = "id")))
shouldShowChangedColsTab <- function(changedCols) {
if (is.null(changedCols)) {
return(FALSE)
}
if (!is.list(changedCols)) {
return(FALSE)
}
if (length(changedCols) == 0L) {
return(FALSE)
}
# Check each possible changed column field
fields <- c(
"caseChange", "spaceRemoved", "periodRemoved", "underScoreRemoved",
"egoToId", "egoidToId", "sireIdToSire", "damIdToDam",
"birthdateToBirth", "deathdateToDeath",
"recordstatusToRecordStatus", "fromcenterToFromCenter"
)
for (field in fields) {
if (field %in% names(changedCols) && length(changedCols[[field]]) > 0L) {
return(TRUE)
}
}
FALSE
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.