library(rbokeh)
library(knitr)
load("{{{di_path}}}")

{{{intro_rmd}}}

if(!is.null(di$meta)) {
  nms <- names(di$meta)
  tmpdf <- data.frame(
    v1 = gsub("_", " ", nms),
    v2 = unname(unlist(di$meta)))

  txt <- c("# Meta #", "",
    "|  property  |  value  |",
    "| ---------- | ------- |",
    apply(tmpdf, 1, function(x) {
      paste("|", paste(x, collapse = " | "), "|")}))

  cat(paste(txt, collapse = "\n"))
}

Data

There are r di$nrow records for r di$ncol variables.

A sample of the data:

DT::datatable(di$head, rownames = FALSE)

Missing Values

plot_missing(di)
txt <- ""
if(length(di$na_cols) > 0 || length(di$dups) > 0)
  txt <- "# Notes #\n\n"

if(length(di$na_cols) > 0)
 txt <- c(paste0("The following variables are all NA: `",
  paste0(names(di$na_cols), collapse = "`, `"), "`"), "")

if(length(di$dups) > 0) {
  txt <- c(txt, "The following variables are duplicates:", "",
    sapply(di$dups, function(x) {
      paste0("- `", paste0(x, collapse = "`, `"), "`")
    }), "")

cat(paste(txt, collapse = "\n"))
}

{{{var_summaries}}}

{{{post_rmd}}}



hafen/datasummary documentation built on May 17, 2019, 1:32 p.m.