df_status: Get a summary for the given data frame (o vector).

Description Usage Arguments Value Examples

View source: R/exploratory_data_analysis.R

Description

For each variable it returns: Quantity and percentage of zeros (q_zeros and p_zeros respectevly). Same metrics for NA values (q_NA/p_na), and infinite values (q_inf/p_inf). Last two columns indicates data type and quantity of unique values. This function print and return the results.

Usage

1
df_status(data, print_results)

Arguments

data

data frame or a single vector

print_results

if FALSE then there is not a print in the console, TRUE by default.

Value

Metrics data frame

Examples

1

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

sh: 1: cannot create /dev/null: Permission denied
funModeling v.1.6.5 :)
Examples and tutorials at livebook.datascienceheroes.com

                 variable q_zeros p_zeros q_na p_na q_inf p_inf    type unique
1                     age       0    0.00    0 0.00     0     0 integer     41
2                  gender       0    0.00    0 0.00     0     0  factor      2
3              chest_pain       0    0.00    0 0.00     0     0  factor      4
4  resting_blood_pressure       0    0.00    0 0.00     0     0 integer     50
5       serum_cholestoral       0    0.00    0 0.00     0     0 integer    152
6     fasting_blood_sugar     258   85.15    0 0.00     0     0  factor      2
7         resting_electro     151   49.83    0 0.00     0     0  factor      3
8          max_heart_rate       0    0.00    0 0.00     0     0 integer     91
9             exer_angina     204   67.33    0 0.00     0     0 integer      2
10                oldpeak      99   32.67    0 0.00     0     0 numeric     40
11                  slope       0    0.00    0 0.00     0     0 integer      3
12      num_vessels_flour     176   58.09    4 1.32     0     0 integer      4
13                   thal       0    0.00    2 0.66     0     0  factor      3
14 heart_disease_severity     164   54.13    0 0.00     0     0 integer      5
15           exter_angina     204   67.33    0 0.00     0     0  factor      2
16      has_heart_disease       0    0.00    0 0.00     0     0  factor      2

funModeling documentation built on July 1, 2020, 5:40 p.m.