Learn R Programming

DataExplorer (version 0.5.0)

create_report: create_report Function

Description

This function generates the report of data profiling.

Usage

create_report(data, output_file = "report.html", output_dir = getwd(), ...)

Arguments

data

data source to be profiled, in either data.frame or data.table format.

output_file

output file name. The default is "report.html".

output_dir

output directory for report. The default is user's current directory.

other arguments to be passed to render.

Examples

Run this code
# 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