describe_df: Return tidy summary of dataframe

View source: R/describe_df.R

describe_dfR Documentation

Return tidy summary of dataframe

Description

Function to return a dataframe with descriptives for a target dataframe. Each row in the returned dataframe will correspond to a column in the original dataframe. Respects grouped dataframes a la dplyr.

Usage

describe_df(data, digits = NULL)

Arguments

data

Dataframe.

digits

Optional argument to round output to a specified number of digits.

Details

Note that the count in the distinct column excludes values of NA.

Examples

describe_df(mtcars)
describe_df(mtcars, 2)
describe_df(mice::boys)

# NAs are excluded from the count of 'distinct'
describe_df(data.frame(var1 = c(0, 1, 1, 0, NA)))

wepelham3/sack2 documentation built on Aug. 5, 2023, 5:53 a.m.