tabulate_duplicates: Tabulate number of duplicated values in a variable

View source: R/clean_data.R

tabulate_duplicatesR Documentation

Tabulate number of duplicated values in a variable

Description

tabulate_duplicates Produce a table of which values are duplicated within a specified variable in a dataframe, and their number of repetitions.

Usage

tabulate_duplicates(df, varname, print_results = FALSE)

Arguments

df

The dataframe containing the variable of interest.

varname

The variable of interest. Must be given as a string to avoid dplyr's non-standard evaluation.

print_results

If TRUE, print the result as a knitr::kable formatted table as well as returning the dataframe.

Examples

## Not run: 
duplicate_bloods <- tabulate_duplicates(bloods, 'subject_id')

## End(Not run)

nzbri/chchpd documentation built on July 6, 2023, 11:27 p.m.