Learn R Programming

lares (version 4.8.4)

df_str: Dataset columns and rows structure

Description

This function lets the user to check quickly the structure of a dataset (data.frame). It returns multiple counters for useful metrics, a plot, and a list of column names for each of the column metrics.

Usage

df_str(df, return = "plot", subtitle = NA, quiet = FALSE)

Arguments

df

Dataframe

return

Character. Return "skimr" for skim report, "numbers" for stats and numbers, "names" for a list with the column names of each of the class types, "plot" for a nice plot with "numbers" output, "distr" for an overall summary plot showing categorical, numeric, and missing values by using plot_df distributions

subtitle

Character. Add subtitle to plot

quiet

Boolean. Keep quiet or show other options available?

See Also

Other Exploratory: corr_cross(), corr_var(), crosstab(), distr(), freqs_df(), freqs_list(), freqs_plot(), freqs(), lasso_vars(), missingness(), plot_cats(), plot_df(), plot_nums(), summer(), tree_var(), trendsRelated()

Examples

Run this code
# NOT RUN {
options("lares.font" = NA) # Temporal
data(dft) # Titanic dataset

# List with the names of the columns classified by class
df_str(dft, "names")

# Dataframe with numbers: total values, row, columns, complete rows....
df_str(dft, "numbers", quiet = TRUE)

# Now, some visualizations
df_str(dft, "plot", quiet = TRUE)
df_str(dft, "distr", quiet = TRUE)
# }

Run the code above in your browser using DataLab