dot-assertMaxCategories: Assert Maximum Categories in a DataFrame Column

.assertMaxCategoriesR Documentation

Assert Maximum Categories in a DataFrame Column

Description

Checks if the number of unique categories in a column of a dataframe is within the allowed limit.

Usage

.assertMaxCategories(df, col, max.categ)

Arguments

df

A data frame containing the column to be checked.

col

The column name or index in the data frame.

max.categ

The maximum allowed number of unique categories.

Value

Stops the function execution if the number of unique categories exceeds max.categ.

Examples

assertMaxCategories(df_XYcol, "x", 10)

vertesy/ggExpress documentation built on Nov. 24, 2024, 10:44 p.m.