knitr::opts_chunk$set(echo=F, warning=F, message = F)
library(glue)
if(is.na(params$data.location)){
  stop("No `data.location` given - report aborted.")
}

r params$human.readable

``` {r, echo=F, results="asis"}

summary <- readRDS(params$data.location)

for (var in names(summary)){ cat(glue("### Value: {var} \n")) cat("\n") d <- summary[[var]] tot <- sum(d[["Count"]]) examples <- d[["Examples"]]

prop <- 100 * examples / tot examples.names <- names(which(prop > 0.1)) other.names <- names(which(!(prop > 0.1))) other.prop <- sum(prop[other.names])

for (ex in examples.names){ cat(glue("'{ex}': {round(examples[[ex]]/tot*100, 1)} % ")) cat("\n\n") } if(other.prop != 0){ cat(glue("Other: {round(other.prop, 1)} % ")) cat("\n\n") cat("\n") }

}

```



Stat-Cook/Data.Quality.Reports documentation built on May 4, 2022, 2:21 p.m.