check_data: Check Data

View source: R/check_data.R

check_dataR Documentation

Check Data

Description

Check Data

Usage

check_data(
  x,
  name = NULL,
  get_duplicates = TRUE,
  get_na_case_pct = FALSE,
  get_na_feature_pct = FALSE
)

Arguments

x

data.frame, data.table or similar structure

name

Character: Name of dataset

get_duplicates

Logical: If TRUE, check for duplicate cases

get_na_case_pct

Logical: If TRUE, calculate percent of NA values per case

get_na_feature_pct

Logical: If TRUE, calculate percent of NA values per feature

Author(s)

E.D. Gennatas

Examples

## Not run: 
n <- 1000
x <- rnormmat(n, 50, return.df = TRUE)
x$char1 <- sample(letters, n, TRUE)
x$char2 <- sample(letters, n, TRUE)
x$fct <- factor(sample(letters, n, TRUE))
x <- rbind(x, x[1, ])
x$const <- 99L
x[sample(nrow(x), 20), 3] <- NA
x[sample(nrow(x), 20), 10] <- NA
x$fct[30:35] <- NA
check_data(x)

## End(Not run)


egenn/rtemis documentation built on Nov. 22, 2024, 4:12 a.m.