column_summaries: convenience function for summarizing data.frame columns

View source: R/column_summaries.R

column_summariesR Documentation

convenience function for summarizing data.frame columns

Description

This function takes a data.frame and returns a simple summary of the columns and their content as a data.frame.

Usage

column_summaries(df, dates_as_char = TRUE)

Arguments

df

a data.frame object

dates_as_char

logical() whether to treat date columns as character

Value

a tibble with two columns, name and column_details. The name column is the column name. The column_details column is a list with five elements:

  • min: the minumum value (including for dates and character)

  • max: the maximum value (including for dates and character)

  • class: the class of the column

  • sample_values: up to five randomly-sampled values

Examples

data(iris)
cs = column_summaries(iris)
head(cs)
str(cs$column_details)


seandavi/sars2pack documentation built on May 13, 2022, 3:41 p.m.