Learn R Programming

DataExplorer (version 0.4.0)

GenerateReport: GenerateReport Function

Description

This function generates the report of data profiling.

Usage

GenerateReport(input_data, output_file = "report.html",
  output_dir = getwd(), ...)

Arguments

input_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 data
data(diamonds)
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 diamonds dataset
GenerateReport(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