This function checks the structure of the given data frame and prints the number of rows, number of columns, column names, column data types, and number of missing values.

check_data_structure(df)

Arguments

df

The data frame to be checked.

Value

None

Examples

df <- data.frame(id = 1:10,
gender = c("male", "female", "male", "male", "male", "male", "male", "male", "female", "female"),
age = c(25, 32, 45, 19, 27, 56, 38, 42, 33, NA),
salary = c(50000, 60000, 75000, 45000, 55000, 90000, NA, 80000, 65000, 70000))

# Check the data structure of the example dataframe
check_data_structure(df)
#> Number of rows: 10
#> 
#> Number of columns: 4
#> 
#> Column names: id, gender, age, salary
#> 
#> Column data types: integer, character, numeric, numeric
#> 
#> Number of missing values: 2