Skip to contents

Returns a tidy summary of each variable's structure, missingness, uniqueness, and suitability for use in regression models.

Usage

dissect(data)

Arguments

data

A data frame.

Value

A tibble with columns: Variable, Type, Missing ( and Regression Hint.

Examples

dissect(data_birthwt)
#> # A tibble: 10 × 6
#>    Variable Type    `Missing (%)` Unique Levels Compatibility
#>    <chr>    <chr>   <chr>          <int> <chr>  <chr>        
#>  1 low      integer 0%                 2 -      maybe        
#>  2 age      integer 0%                24 -      compatible   
#>  3 lwt      integer 0%                75 -      compatible   
#>  4 race     integer 0%                 3 -      compatible   
#>  5 smoke    integer 0%                 2 -      maybe        
#>  6 ptl      integer 0%                 4 -      compatible   
#>  7 ht       integer 0%                 2 -      maybe        
#>  8 ui       integer 0%                 2 -      maybe        
#>  9 ftv      integer 0%                 6 -      compatible   
#> 10 bwt      integer 0%               131 -      compatible   
#> 
#> Interpretation notes:
#> - compatible: ready to use in regression
#> - maybe: require transformation to factor or check no of levels
#> - incompatible: not usable as-is (e.g., all NA, <2 levels)