df_str: Dataset columns and rows structure

View source: R/dataframe_str.R

df_strR Documentation

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?

Value

Depending on return input and based on your df structure:

  • list with the names of the columns classified by class

  • data.frame with numbers: total values, row, columns, complete rows

  • plot with visualizations

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(), tree_var()

Examples

Sys.unsetenv("LARES_FONT") # Temporal
data(dft) # Titanic dataset
df_str(dft, "names")
df_str(dft, "numbers", quiet = TRUE)
df_str(dft, "plot", quiet = TRUE)

laresbernardo/lares documentation built on April 25, 2024, 5:31 a.m.