# NOT RUN {
# load library
library(ggplot2)
library(data.table)
# load diamonds dataset from ggplot2
data("diamonds", package = "ggplot2")
diamonds2 <- data.table(diamonds)
# manually set some missing values
for (j in 5:ncol(diamonds2)) {
set(diamonds2,
i = sample.int(nrow(diamonds2), sample.int(nrow(diamonds2), 1)),
j,
value = NA_integer_)}
# generate report for diamonds2 dataset
create_report(diamonds2,
output_file = "report.html",
output_dir = getwd(),
html_document(toc = TRUE, toc_depth = 6, theme = "flatly"))
# }
Run the code above in your browser using DataLab