knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE) library(AnvilDataModels) library(dplyr)
tables <- params$tables model <- params$model return_value <- TRUE # returned to render function to indicate T/F passing checks
Data model version: r attr(model, "data_model_version")
chk <- check_column_names(tables, model) res <- parse_column_name_check(chk) if (nrow(res) > 0) { knitr::kable(res) } else { cat("All column names match data model.") } if (length(unlist(lapply(chk, function(x) x$missing_required_columns))) > 0) return_value <- FALSE
chk <- check_missing_values(tables, model) res <- parse_column_type_check(chk) if (nrow(res) > 0) { return_value <- FALSE knitr::kable(res) } else { cat("No missing values in required columns.") }
chk <- check_column_types(tables, model) res <- parse_column_type_check(chk) if (nrow(res) > 0) { return_value <- FALSE knitr::kable(res) } else { cat("All column types match data model.") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.