var_summary: Simple summary of the variables in a data frame

View source: R/var_summary.R

var_summaryR Documentation

Simple summary of the variables in a data frame

Description

A summary tibble of the columns of a data frame. Each row in the output corresponds to a column in df.

Usage

var_summary(df, na_strings = string_missing())

Arguments

df

A data frame.

na_strings

Character vector to match for the str_missing column.

Value

A tibble with columns as follows.

var

The name of the column in df.

index

The position of the column in df.

class

The first element of the class of the column.

unique

The number of unique values in the column. Note that NA and NaN are counted as distinct value in this.

missing

The number of missing values in the column (NA or NaN).

pct_missing

The percentage of values in the column that are missing.

str_missing

The number of matches to strings in the na_strings argument. See count_matches() for details of how the count is done.


jedwards24/edwards documentation built on Sept. 2, 2023, 8:16 a.m.