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.

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

df_status(heart_disease)
#> 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