Scan Data for Quick Structural Summaries and Checks

Scans data for checking columns that are constant, one-to-one, missing or all unique. Users can also try to identify the columns that uniquely index the observational unit and whether some columns are nested or complete.


datascan

The goal of datascan is to provide a set of functions to perform data quality checks and data exploration in R. It includes functions for checking missing values, identifying nested columns, and other common data quality issues.

Installation

You can install the development version of datascan from GitHub with:

# install.packages("pak")
pak::pak("emitanaka/datascan")

Example

This is a basic example which shows you how to solve a common problem:

library(datascan)
head(CO2)
#>   Plant   Type  Treatment conc uptake
#> 1   Qn1 Quebec nonchilled   95   16.0
#> 2   Qn1 Quebec nonchilled  175   30.4
#> 3   Qn1 Quebec nonchilled  250   34.8
#> 4   Qn1 Quebec nonchilled  350   37.2
#> 5   Qn1 Quebec nonchilled  500   35.3
#> 6   Qn1 Quebec nonchilled  675   39.2
cols_identify_all(CO2)
#> → No columns with all unique values.
#> → No bijective columns.
#> → No constant columns.
#> → No identified columns with missing proportion.
#> 
#> ── Checking if all values are unique in a column ───────────────────────────────
#> [1] NA
#> 
#> ── Checking if any two columns are bijective ───────────────────────────────────
#> list()
#> 
#> ── Checking if any column is all constant ──────────────────────────────────────
#> [1] NA
#> 
#> ── Checking if columns with preset cut-off in missing values ───────────────────
#> [1] NA
cols_nested(CO2)
#> [[1]]
#> [1] "Plant" "Type" 
#> 
#> [[2]]
#> [1] "Plant"     "Treatment"
concurrence_matrix(CO2, Plant, Type)
#> • Diagonal shows the total number of levels for Plant at the corresponding
#>   level for Type
#> • Off-diagonal shows the number of common levels for Plant between the two
#>   levels for Type
#>              
#>               Quebec Mississippi
#>   Quebec           6           0
#>   Mississippi      0           6
#>   
#> ℹ Concurrence matrix: 2 × 2 Type.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("datascan")

0.1.1 by Emi Tanaka, 8 hours ago


https://github.com/emitanaka/datascan, https://emitanaka.org/datascan/


Report a bug at https://github.com/emitanaka/datascan/issues


Browse source code at https://github.com/cran/datascan


Authors: Emi Tanaka [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, dplyr, glue, magrittr, pillar, rlang, tibble, tidyr, tidyselect

Suggests testthat


See at CRAN