knitr::opts_chunk$set(echo = FALSE, warning = FALSE)
options(DT.warn.size = FALSE)
library(flexdashboard)
library(DT)

secondary_col <-  "#ff9470"
found_color <- "#77d983"
not_found_color <- "#e36868"

Potential problems {data-orientation=rows}

Row1 {.tabset .tabset-fade}

Parsing issues summary

parsing_prob <- params$parsing_prob |>
  dplyr::mutate(col = as.factor(.data$col))
datatable(parsing_prob, 
          class = "stripe",
          filter = "top", 
          options = list(scrollY = "450px"))
cat("*Nothing to report*")

About

The table contains a summary of parsing problems found when reading the association file. This can be caused by inconsistencies between the defined column classes and the actual values contained in the columns. For example: if a column has been declared as "integer" anything that is not read as an integer in the column will produce a parsing error and therefore an NA value. NOTE: if the input file was in xlsx/xls format no parsing problems are reported by default

Row2 {.tabset .tabset-fade}

Date conversion problems

dates_probs <- params$dates_prob |>
  dplyr::mutate(col = as.factor(.data$col))
datatable(dates_probs, 
          class = "stripe",
          filter = "top",
          options = list(scrollY = "450px"))
cat("*Nothing to report*")

About

The table contains a summary of date parsing problems. Check the date format was set correctly and the association file contains the correct information.

Row3

Column problems

miss_col_str <- if (is.null(params$col_prob$missing)) {
  "*No missing columns to report*"
} else {
  paste0(params$col_prob$missing, collapse = ", ")
}
non_std_str <- if (is.null(params$col_prob$non_standard)) {
  "*no non-standard columns to report*"
} else {
  paste0(params$col_prob$non_standard, collapse = ", ")
}
whole <- paste0("#### Missing columns\n", 
                "##### Columns marked as required that are missing\n**", 
                miss_col_str, "**\n\n",
                "#### Non standard columns\n", 
                "##### Additional columns not specified in columns specs\n**",
                non_std_str, "**")
cat(whole)

Important missing info

expl <- "Missing information that is needed for some operations and may cause issues.\n\n **NOTE:** the following refer to post-filtering data ONLY (if a filter was set in the import phase via the `filter_for` argument)."
crit_na_msg <- if (is.null(params$crit_nas)) {
  "*Nothing to report, everything in order*"
} else {
  paste0("NAs found in columns:\n\n",
         paste0("* ", params$crit_nas, collapse = "\n"))
}
cat(expl, "\n\n", crit_na_msg)


Reproducibility {data-orientation=rows}

Row1 {data-height=600}

Session info {style="width: 95% !important"}

sessionInfo()


calabrialab/ISAnalytics documentation built on Nov. 2, 2023, 8:57 p.m.