diagnose: Checks if a table is in its expected form

Description Usage Arguments Details Examples

View source: R/diagnose.R

Description

Runs tests on a table to check if its variables pass certain standards and fit certain assumptions specified via exams

Usage

1
diagnose(X, exams = guess_exams(X))

Arguments

X

Table to run tests on

exams

Tests to be run on X (see vignette("doctr_diagnose") for more information)

Details

This function receives a table and a battery of exams that its variables should pass; if a variable doesn't pass any of these tests, comprehensive reports are created (you can access them with issues())

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(tidyverse)
  
# Running default diagnostics on a table
txhousing %>% diagnose() %>% issues()
  
# Running custom diagnostics on a table
exams <- guess_exams(txhousing)
exams$max_val[5] <- 2000000000
txhousing %>% diagnose(exams) %>% issues(verbose = TRUE)

## End(Not run)

doctr documentation built on May 4, 2017, 5:11 p.m.

Related to diagnose in doctr...