.assertMaxCategories | R Documentation |
Checks if the number of unique categories in a column of a dataframe is within the allowed limit.
.assertMaxCategories(df, col, max.categ)
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. |
Stops the function execution if the number of unique categories exceeds max.categ.
assertMaxCategories(df_XYcol, "x", 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.