Given a dataframe, this function performs the following steps:

  • Simple diagnose of numerical and categorical variables with the diagnose_numeric and diagnose_category functions, respectively.

  • Diagnose of numerical and categorical variables with the diagnose_numeric and diagnose_category functions, respectively, after grouping by a factor (e.g., cohort).

  • Concise summary of continuous and categorical variables with the tbl_summary function.

  • Detailed summary of continuous and categorical variables with the tbl_summary function.

  • Visualization of the correlation structure of the dataframe using the correlate and rplot functions, with both Pearson's and Spearman's correlation.

describe_data(dat, id_var, by_var, do_corrr = FALSE)

Arguments

dat

A dataframe containing the variables of interest. A dataframe.

id_var

The variable name to be used to identify subjects. A string.

by_var

The variable name to group by. A string.

do_corrr

Value

A nested named list containing the objects corresponding to the steps described above.