Learn R Programming

k5 (version 0.2.1)

var_missing: Apply a statistic function to all variables

Description

Apply either count_na() or dplyr::n_distinct() to every column of a data frame and return the count and share of total values (either proportion missing or proportion distinct).

Usage

var_missing(df)

var_distinct(df)

Value

Invisibly, a table of statistics by column of a data frame.

Arguments

df

A data frame to glimpse.

Examples

Run this code
var_missing(dplyr::storms)
var_distinct(dplyr::storms)

Run the code above in your browser using DataLab