Learn R Programming

niarules (version 0.2.0)

calculate_selected_category: Calculate the selected category based on a value and the number of categories.

Description

This function calculates the selected category based on a given value and the total number of categories.

Usage

calculate_selected_category(value, num_categories)

Value

The calculated selected category.

Arguments

value

The value to calculate the category for.

num_categories

The total number of categories.

Examples

Run this code
selected_category <- calculate_selected_category(0.3, 5)

Run the code above in your browser using DataLab