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") }
}
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.