unique_n: Pretty print number of unique elements in a vector

View source: R/init.R

unique_nR Documentation

Pretty print number of unique elements in a vector

Description

The result will be cat'ed to the screen. tidytable compatable. Maje

Usage

unique_n(x, label = "items", sel_col = NULL, ret = FALSE)

Arguments

x

a vector or data.table. If data.table, sel_col must not be NULL

label

what to call the items in the vector (eg., "samples")

sel_col

If x is data.table or data.frame, which column to assess?

ret

Return the unique values?


leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.