audit_report_excel: Performs a quality audit of a table

Description Usage Arguments Details Value Examples

View source: R/audit_report.R

Description

This function builds an excel report based on the result of a quality check. It renders an excel report with predefined styles using the openxlsx package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
audit_report_excel(
  data = NULL,
  quality_res = NULL,
  output_file = NULL,
  numeric_cutoff = -1,
  na_type = NULL,
  max_length = Inf,
  global_only = FALSE,
  na_threshold = c(40, 80),
  verbose = TRUE
)

Arguments

data

a data.frame

quality_res

an object with class qualityResult obtained with data_quality()

output_file

output file name

numeric_cutoff

the minimum number of distinct values required for a numeric vector not to be coerced to a fator. -1 is the default, meaning no minimum required.

na_type

charcater vector with valus that should be considered NA. Default to NULL, no values other than regular NA are treated as NA.

max_length

the maximum number of rows in the frequency tables

global_only

logical, whether to return only the global summary

na_threshold

numeric vector of length 2 defining the range of colors in the output for the percentage of missing values. Default to c(40, 80).

verbose

logical, should information messages be printed in the console? default to TRUE.

Details

If quality_res is provided, data, numeric_cutoff, na_type and max_length are ignored.

Value

invisible, a list with a global summary, and if available, information on numeric, categorical and date variables

Examples

1
2
3
4
5
data(mtcars)
audit_report_excel(mtcars, output_file = "mtcars.xlsx")

data(iris)
audit_report_excel(mtcars, output_file = "iris.xlsx")

MathieuMarauri/auditdata documentation built on March 6, 2020, 7:09 p.m.